{
  "info": {
    "title": "REST API",
    "version": "2.0.0",
    "description": "# B2B REST API\n\nДокументація згенерована з коду Flask (маршрути, схеми, відповіді).\n\n## Аутентифікація\n\n- **Authorization** — API-токен у заголовку `Authorization`.\n- **SessionToken** — опційний заголовок `BM-X-Token` для web-сесії.\n- Публічні методи (`/health/*`, частина EDO) без токена.\n\nДати — ISO 8601.\n",
    "contact": {
      "name": "BM Parts Developer Support"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "paths": {
    "/profile/preference/extra/pre_check/interval": {
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Попередня перевірка валідності даних інтервальної націнки",
        "description": "Перевіряє інтервал націнки без збереження. невалідні дані повертаються HTTP 200 `{success: false, message}`. Якщо передано query `uuid` і інтервалу немає — message `Націнку не знайдено.`. Інші тексти — з `filter_extra_dict_fields` і валідаторів extra. Перетин інтервалів — 200 `{success: true, message, overlap_interval_uuids}`.\n",
        "parameters": [
          {
            "name": "uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "integer",
                    "description": "from"
                  },
                  "value": {
                    "type": "integer",
                    "description": "value"
                  },
                  "to": {
                    "type": "integer",
                    "nullable": true,
                    "description": "to"
                  }
                },
                "required": [
                  "from",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат перевірки (у тому числі спійманий 422)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraPreCheckResponseSchema"
                },
                "examples": {
                  "ok": {
                    "summary": "Валідація пройшла",
                    "value": {
                      "success": true,
                      "message": null
                    }
                  },
                  "not_found": {
                    "summary": "спійманий 422",
                    "value": {
                      "success": false,
                      "message": "Націнку не знайдено."
                    }
                  },
                  "invalid_body": {
                    "summary": "спійманий 422 з filter_extra_dict_fields",
                    "value": {
                      "success": false,
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference/extra/pre_check/brand": {
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Попередня перевірка валідності даних націнки по бренду",
        "description": "Перевіряє націнку бренду без збереження. невалідні дані повертаються HTTP 200 `{success: false, message}`. Query `name` для режиму редагування: якщо бренду немає — message `Націнку не знайдено`. Інші тексти — `filter_extra_dict_fields` (`Некоректний формат тіла запиту. Очікується JSON-об'єкт`, `Некоректний JSON. Відсутні обов'язкові поля.`) і `Передано некоректний бренд.` / `Некоректне значення націнки.`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "integer",
                    "description": "value"
                  },
                  "name": {
                    "type": "string",
                    "description": "name"
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат перевірки (у тому числі спійманий 422)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraPreCheckResponseSchema"
                },
                "examples": {
                  "ok": {
                    "summary": "Валідація пройшла",
                    "value": {
                      "success": true,
                      "message": null
                    }
                  },
                  "not_found": {
                    "summary": "спійманий 422",
                    "value": {
                      "success": false,
                      "message": "Націнку не знайдено"
                    }
                  },
                  "invalid_brand": {
                    "summary": "спійманий 422",
                    "value": {
                      "success": false,
                      "message": "Передано некоректний бренд."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Опційний query-параметр для режиму редагування існуючої націнки (оригінальна назва бренду). У тілі запиту також передається name/value."
          }
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/reclamation/form/save": {
      "post": {
        "tags": [
          "Return Products"
        ],
        "summary": "Зберегти чернетку рекламації",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "installation_at": {
                    "type": "string"
                  },
                  "car_code": {
                    "type": "string"
                  },
                  "car_model": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "partner_unit": {
                    "type": "string"
                  },
                  "defect_cause": {
                    "type": "string"
                  },
                  "defect_detection_case": {
                    "type": "string"
                  },
                  "diagnostic_equipment": {
                    "type": "string"
                  },
                  "car_number": {
                    "type": "string"
                  },
                  "partner_name": {
                    "type": "string"
                  },
                  "odometer_end": {
                    "type": "integer"
                  },
                  "odometer_start": {
                    "type": "integer"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "partner_address": {
                    "type": "string"
                  },
                  "car_engine": {
                    "type": "string"
                  },
                  "prod_year": {
                    "type": "string"
                  },
                  "disassembling_at": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "integer"
                  },
                  "partner_phone": {
                    "type": "string"
                  },
                  "sales_doc_uuid": {
                    "type": "string"
                  },
                  "defect_description": {
                    "type": "string"
                  },
                  "car_brand": {
                    "type": "string"
                  },
                  "product_uuid": {
                    "type": "string"
                  }
                },
                "required": [
                  "product_uuid",
                  "quantity",
                  "sales_doc_uuid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsSaveFormResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Форму рекламації збережено як чернетку."
                }
              }
            }
          },
          "409": {
            "description": "Конфлікт"
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Зберегти чернетку рекламації",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/reserve/products/detailed": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати деталізовану інформацію про товари зі списку резервів",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShoppingCartReserveProductsRequestSchema"
              },
              "example": {
                "reserves_uuid": [
                  "8191005056BA39E811EBC9F072221C0D"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingReservedProductsResponseSchema"
                },
                "example": {
                  "reserved_products": [
                    {
                      "uuid": "8191005056BA39E811EBC9F072221C0D",
                      "number": "ВХ002170065",
                      "date": "2026-08-14T10:47:23Z",
                      "sum": 80.01,
                      "shipping_date": "0001-01-01T00:00:00Z",
                      "currency": "ГРН",
                      "comment": "",
                      "status": "Очікує збірки",
                      "carrier": "Нова пошта",
                      "delivery_date": "2026-08-14T17:05:00Z",
                      "delivery_setting": "Нова пошта, Бахів (1)",
                      "route": "",
                      "route_date": "2026-08-14T17:05:00Z",
                      "can_edit_delivery": true,
                      "warehouse": {
                        "name": "Київ",
                        "uuid": "81F4005056AC66D611EAD7173350C7AA",
                        "address": "вул. Тестова 1"
                      },
                      "weight": 0.1,
                      "owner": {
                        "uuid": "812D000C2999A7E611E576524555E66A",
                        "name": "Контрагент",
                        "f": 1
                      },
                      "products": [
                        {
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                          "code": "000029214",
                          "article": "OC47",
                          "brand": "BOSCH",
                          "name": "Оливний фільтр",
                          "default_image": "photo/oc47.jpeg",
                          "count": 1,
                          "multiplicity": 1,
                          "price": 80.01,
                          "sum": 80.01,
                          "restricted_delivery": [],
                          "is_paid_delivery": false
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Не передано обов'язковий параметр [reserves_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не передано обов'язковий параметр [reserves_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати деталізовану інформацію про товари зі списку резервів",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference/extra/interval": {
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Додати інтервальну націнку",
        "description": "Додати інтервал націнки до preference поточного логіна.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "integer",
                    "description": "from"
                  },
                  "value": {
                    "type": "integer",
                    "description": "value"
                  },
                  "to": {
                    "type": "integer",
                    "nullable": true,
                    "description": "to"
                  }
                },
                "required": [
                  "from",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraSaveResponseSchema"
                },
                "example": {
                  "success": true,
                  "extra": {
                    "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                    "from": 0,
                    "to": 1000,
                    "value": 5
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідне тіло інтервальної націнки",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                    "value": {
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_fields": {
                    "summary": "Некоректний JSON. Відсутні обов'язкові поля.",
                    "value": {
                      "message": "Некоректний JSON. Відсутні обов'язкові поля.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_range": {
                    "summary": "Вказано неправильний діапазон цін.",
                    "value": {
                      "message": "Вказано неправильний діапазон цін.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "from_gte_to": {
                    "summary": "Діапазон цін має бути від меншого до більшого.",
                    "value": {
                      "message": "Діапазон цін має бути від меншого до більшого. Вкажіть правильний діапазон",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_too_long": {
                    "summary": "Максимальна довжина націнки — 3 символи.",
                    "value": {
                      "message": "Максимальна довжина націнки — 3 символи.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_negative": {
                    "summary": "Некоректне значення націнки.",
                    "value": {
                      "message": "Некоректне значення націнки.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_type": {
                    "summary": "Некоректний тип даних для поля [from]. Очікується число.",
                    "value": {
                      "message": "Некоректний тип даних для поля [from]. Очікується число.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера (500 без тексту при збої commit)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/currencies/rates/history": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Історія курсів валют",
        "description": "Повертає історію курсів валют за останні сім днів від поточної дати, згруповану за кодом валюти.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceHistoryRatesResponseSchema"
                },
                "example": {
                  "history_rates": {
                    "USD": [
                      {
                        "period": "2024-03-15T00:00:00",
                        "rate": 41.25
                      }
                    ],
                    "EUR": [
                      {
                        "period": "2024-03-15T00:00:00",
                        "rate": 44.8
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference/extra/brand": {
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Додати націнку по бренду",
        "description": "Додати націнку по бренду до preference поточного логіна.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "name"
                  },
                  "value": {
                    "type": "integer",
                    "description": "value"
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraSaveResponseSchema"
                },
                "example": {
                  "success": true,
                  "extra": {
                    "name": "BOSCH",
                    "value": 3
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідна націнка по бренду",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                    "value": {
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_fields": {
                    "summary": "Некоректний JSON. Відсутні обов'язкові поля.",
                    "value": {
                      "message": "Некоректний JSON. Відсутні обов'язкові поля.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_brand": {
                    "summary": "Передано некоректний бренд.",
                    "value": {
                      "message": "Передано некоректний бренд.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_negative": {
                    "summary": "Некоректне значення націнки.",
                    "value": {
                      "message": "Некоректне значення націнки.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_too_long": {
                    "summary": "Максимальна довжина націнки — 3 символи.",
                    "value": {
                      "message": "Максимальна довжина націнки — 3 символи.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера (500 без тексту при збої commit)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/advertisements": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по акціях та спецпропозиціях",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Активні акції у вибірці",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsAdvertisementsResponseSchema"
                },
                "example": {
                  "advertisements": [
                    {
                      "uuid": "A1B2000C2947F7AE11E23F5617780B16",
                      "name": "Літня акція",
                      "products_count": 56
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає активні акції, які зустрічаються в поточній пошуковій вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/end_nodes": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по вузлах нижнього рівня (кінцеві категорії)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "nodes_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "arr"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Кінцеві вузли вибірки",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsEndNodesResponseSchema"
                },
                "example": {
                  "end_nodes": {
                    "more": false,
                    "total": 24,
                    "nodes": [
                      {
                        "path": "Двигун/Фільтри/Масляні",
                        "name": "Двигун/Фільтри/Масляні"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по кінцевих категоріях каталогу в поточній вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/brands": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація за брендами",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Агрегація брендів у поточній вибірці",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsBrandsResponseSchema"
                },
                "example": {
                  "brands": [
                    {
                      "name": "BOSCH",
                      "products_count": 128
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по брендах у поточній пошуковій вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/nodes": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по складальних вузлах",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "nodes_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "arr"
            },
            "required": false
          },
          {
            "name": "sub_nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Агрегація по складальних вузлах",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsNodesResponseSchema"
                },
                "example": {
                  "nodes": [
                    {
                      "path": "Двигун/Фільтри",
                      "name": "Фільтри"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по складальних вузлах у поточній вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/cars": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по автомобільних брендах",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "cars_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "arr",
                "obj"
              ],
              "default": "arr"
            },
            "description": "Формат повернення авто",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Агрегація по автомобільних брендах",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsCarsResponseSchema"
                },
                "example": {
                  "cars": [
                    {
                      "name": "BMW",
                      "products_count": 320
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по марках автомобілів у поточній вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/download/unreturned": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Excel файл з товарами, які не вдалося повернути",
        "description": "Excel файл з товарами, які не вдалося повернути",
        "responses": {
          "201": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Файл з неімпортованими товарами недоступний для завантаження",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Файл з неімпортованими товарами недоступний для завантаження",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/returns/product": {
      "post": {
        "tags": [
          "Return Products"
        ],
        "summary": "Додавання товарів до списку повернення",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "array",
                    "description": "Список товарів для додавання до повернення",
                    "items": {
                      "type": "object",
                      "properties": {
                        "document_uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "product_uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "return_cause_uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "document_uuid",
                        "product_uuid",
                        "return_cause_uuid",
                        "quantity"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsAddResponseSchema"
                },
                "example": {
                  "success_rows": [
                    {
                      "document_uuid": "8191005056BA39E811EBC9F072221C0D",
                      "product_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "return_cause_uuid": "CA000000000000000000000000000001",
                      "quantity": 1,
                      "price": 325.5,
                      "client_uuid": "CL000000000000000000000000000001"
                    }
                  ],
                  "err_rows": []
                }
              }
            }
          },
          "578": {
            "description": "Помилка сервера"
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Додавання товарів до списку повернення",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/import/from_file": {
      "post": {
        "tags": [
          "Return Products"
        ],
        "summary": "Імпорт товарів із Excel файлу до списку повернень",
        "description": "Імпорт товарів із Excel файлу до списку повернень",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "file"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsImportFileResponseSchema"
                },
                "example": {
                  "success_rows": null,
                  "error_rows": [
                    {
                      "document_number": "РН001234",
                      "document_link": null,
                      "quantity": 1,
                      "product": {
                        "article": "OC47",
                        "brand": "BOSCH",
                        "multiplicity": 1
                      }
                    }
                  ],
                  "download_error_rows": "{base_url}/return_products/download/unreturned"
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsImportFileResponseSchema"
                },
                "example": {
                  "success_rows": [
                    {
                      "document_number": "РН001234",
                      "document_link": "{base_url}/documents/{type}/{uuid}",
                      "quantity": 1,
                      "product": {
                        "article": "OC47",
                        "brand": "BOSCH",
                        "multiplicity": 1
                      }
                    }
                  ],
                  "error_rows": null,
                  "download_error_rows": null
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний файл імпорту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_file": {
                    "summary": "Потрібно передати файл",
                    "value": {
                      "message": "Потрібно передати файл",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "wrong_format": {
                    "summary": "Некоректний формат файлу",
                    "value": {
                      "message": "Некоректний формат файлу",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "empty_file": {
                    "summary": "Файл з товарами не може бути порожнім",
                    "value": {
                      "message": "Файл з товарами не може бути порожнім",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/banner/random": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати випадковий банер",
        "parameters": [
          {
            "name": "advert",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "banner_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandomBannerResponseSchema"
                },
                "example": {
                  "banner": {
                    "banner_url": "https://cdn.bm.parts/promo/home.jpg",
                    "banner_code": "home",
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID акції в параметрі advert",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає випадковий банер серед активних онлайн-акцій. Можна звузити вибірку за `banner_code` та `advert`. Невалідний UUID в `advert` дає 422 з типовим текстом хендлера.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/reserves/pre_check": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження резерву",
        "description": "Перевіряє, чи можна відвантажити резерви з query `order_uuid`. Відсутній або невалідний список UUID — 422. UUID, якого немає серед резервів клієнта — також 422. general_pre_check може дати 422 для client_uuid або сплячих ФОП.\n",
        "parameters": [
          {
            "name": "order_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Список UUID замовлень/резервів"
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID контрагента",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідний або відсутній список замовлень",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_orders": {
                    "summary": "Необхідно передати значення параметра [order_uuid]",
                    "value": {
                      "message": "Необхідно передати значення параметра [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_orders": {
                    "summary": "Необхідно передати коректний список замовлень",
                    "value": {
                      "message": "Необхідно передати коректний список замовлень",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "unknown_orders": {
                    "summary": "Вказано некоректне значення параметру [order_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження резерву",
        "description": "POST-варіант перевірки резерву: `order_uuid` у JSON. Відсутній або невалідний список UUID — 422. UUID, якого немає серед резервів клієнта — також 422. general_pre_check може дати 422 для client_uuid або сплячих ФОП.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order_uuid"
                ],
                "properties": {
                  "client_uuid": {
                    "type": "string"
                  },
                  "order_uuid": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідний або відсутній список замовлень",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_orders": {
                    "summary": "Необхідно передати значення параметра [order_uuid]",
                    "value": {
                      "message": "Необхідно передати значення параметра [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_orders": {
                    "summary": "Необхідно передати коректний список замовлень",
                    "value": {
                      "message": "Необхідно передати коректний список замовлень",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "unknown_orders": {
                    "summary": "Вказано некоректне значення параметру [order_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/reserve/process": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Відвантажити зарезервовані замовлення (синхронно)",
        "description": "Відвантажує резерви через 1С. Невалідний orders_array, резерви з різних складів/власників, невалідний delivery_config або warehouse дають 422 з текстами нижче.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orders_array": {
                    "type": "array",
                    "description": "UUID зарезервованих замовлень",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "delivery_config": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "expired_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "departure_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "route_code": {
                    "type": "string"
                  },
                  "route_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "comment": {
                    "type": "string"
                  }
                },
                "required": [
                  "orders_array",
                  "delivery_config",
                  "warehouse",
                  "departure_at",
                  "expired_at",
                  "key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingReserveProcessResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "document": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ПП001325988",
                    "date": "2026-08-14T16:33:32Z",
                    "sum": 951.42,
                    "currency": "ГРН",
                    "type": "000000CC",
                    "url": "https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D"
                  },
                  "delivery_config": null
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingReserveProcessResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "document": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ПП001325988",
                    "date": "2026-08-14T16:33:32Z",
                    "sum": 951.42,
                    "currency": "ГРН",
                    "type": "000000CC",
                    "url": "https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D",
                    "message": null,
                    "warehouse_address": null
                  },
                  "delivery_config": null
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри відвантаження резервів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_orders": {
                    "summary": "Необхідно передати коректний список замовлень",
                    "value": {
                      "message": "Необхідно передати коректний список замовлень",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "mixed_warehouses": {
                    "summary": "Заборонено відвантажувати резерви з різних складів",
                    "value": {
                      "message": "Заборонено відвантажувати резерви з різних складів",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "mixed_owners": {
                    "summary": "Заборонено відвантажувати резерви різних власників",
                    "value": {
                      "message": "Заборонено відвантажувати резерви різних власників",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_delivery": {
                    "summary": "Вказано некоректне значення параметра [delivery_config]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [delivery_config]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_warehouse": {
                    "summary": "Вказано некоректне значення параметра [warehouse]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [warehouse]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/order/change_delivery_settings": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Змінити налаштування доставки в замовлення",
        "description": "Оновлює delivery_config і warehouse замовлення в 1С. Невалідний order_uuid, відмова в зміні, невалідний delivery_config або warehouse дають 422 з текстами нижче. FormValidationError форми — стандартний 422 без тексту.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "delivery_config",
                  "warehouse",
                  "order_uuid",
                  "key",
                  "expired_at",
                  "departure_at"
                ],
                "properties": {
                  "delivery_config": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "expired_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "departure_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "route_code": {
                    "type": "string"
                  },
                  "route_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "order_uuid": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingChangeDeliveryResponseSchema"
                },
                "example": {
                  "result": true,
                  "message": null
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри зміни доставки",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_order": {
                    "summary": "Вказано некоректне значення параметру [order_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "denied": {
                    "summary": "Відмовлено у зміні замовлення",
                    "value": {
                      "message": "Відмовлено у зміні замовлення",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_delivery": {
                    "summary": "Вказано некоректне значення параметру [delivery_config]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [delivery_config]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_warehouse": {
                    "summary": "Вказано некоректне значення параметру [warehouse]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [warehouse]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/filters/edo_statuses": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Едо статуси",
        "description": "Едо статуси",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsEdoStatusesResponseSchema"
                },
                "example": {
                  "edo_statuses": [
                    {
                      "key": "all",
                      "name": "Всі"
                    },
                    {
                      "key": "signed",
                      "name": "Підписані"
                    },
                    {
                      "key": "unsigned",
                      "name": "Непідписані"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/filters/groups": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Групи документів",
        "description": "Повертає групи типів документів (продажі, ТТН, оплати, заявки, повернення, рекламації, акти) з кодами типів і ознакою edo_filter. Кешується на годину.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsTypeGroupsResponseSchema"
                },
                "example": {
                  "groups": [
                    {
                      "code": "sales",
                      "name": "Закупівлі",
                      "types": [
                        "0000013C"
                      ],
                      "edo_filter": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/filters/types": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Типи документів",
        "description": "Повертає довідник типів документів журналу (код, назва, опис) для фільтрів UI. Кешується на годину.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsTypesResponseSchema"
                },
                "example": {
                  "types": [
                    {
                      "code": "0000013C",
                      "name": "Закупівлі",
                      "description": "Видаткова накладна"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/filters/dates": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Швидкий вибір дат",
        "description": "Повертає пресети періодів для фільтрів. `dates_as=obj` — об'єкт з ключами періодів; `dates_as=arr` — масив періодів. За наявності `target` додатково повертається `min_available_date`.\n",
        "parameters": [
          {
            "name": "dates_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "required": false
          },
          {
            "name": "target",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "documents",
                "reconciliation",
                "payment_report",
                "brands_turnover",
                "groups_turnover",
                "carrier_turnover",
                "returns_report",
                "reclamations_report",
                "search_stat"
              ]
            },
            "description": "Ідентифікатор функціоналу, для якого визначається ліміт періоду.\n",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dates": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": {
                            "$ref": "#/components/schemas/DocumentsDatePeriodSchema"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/DocumentsDatePeriodSchema"
                          }
                        }
                      ]
                    },
                    "min_available_date": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "example": {
                  "dates": {
                    "today": {
                      "name": "Сьогодні",
                      "start": "2026-08-14T00:00:00Z",
                      "end": "2026-08-14T23:59:59Z",
                      "order": 0
                    }
                  },
                  "min_available_date": null
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний dates_as (args_choice_wrapper) дає 422 з текстом про параметр. Невідомий target у get_min_available_date не падає з помилкою.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_dates_as": {
                    "summary": "Недопустиме значення параметру [dates_as]",
                    "value": {
                      "message": "Недопустиме значення параметру [dates_as]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/warehouses/departures": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Отримати найближчі рейси для доступних складів",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryWarehousesDeparturesResponseSchema"
                },
                "example": {
                  "warehouses": [
                    {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ",
                      "short_name": "Київ-1",
                      "route_at": "2026-08-31T18:00:00",
                      "receipt_at": "2026-09-01T09:00:00",
                      "is_main": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати найближчі рейси для доступних складів",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/couriers/departures/archive": {
      "get": {
        "tags": [
          "Couriers"
        ],
        "summary": "Отримати список рейсів, які відбулися",
        "description": "Повертає архівні виїзди за останні два дні. Будь-який виняток — 500 без тексту (`Помилка сервера`).\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchiveDeparturesResponseSchema"
                },
                "example": {
                  "archive_departures": [
                    {
                      "waybill_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "warehouse_name": "Київ",
                      "driver": {
                        "name": "Іван Петренко",
                        "photo_url": "https://cdn.bm.parts/image/workers/abc.jpeg",
                        "phone": null
                      },
                      "route": {
                        "points": [
                          {
                            "delivery_address": "вул. Львівська 17/15",
                            "delivery_end": "2026-08-13T18:00:00Z"
                          }
                        ]
                      },
                      "ttn": [
                        {
                          "uuid": "B1C2D3E4F5A6789012345678ABCDEF01",
                          "number": "ТТН-12345",
                          "document_type": "00003A4D"
                        }
                      ],
                      "feedback": {
                        "comment": "Дякую",
                        "score": 5
                      },
                      "total": {
                        "sum": null,
                        "currency": null
                      },
                      "is_ratable": true
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "500 без тексту — Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/couriers/departures/active": {
      "get": {
        "tags": [
          "Couriers"
        ],
        "summary": "Отримати список активних рейсів",
        "description": "Повертає активні виїзди власного кур'єра та Uklon для контрагентів холдингу. Будь-який виняток у вибірці — 500 без тексту, тобто `Помилка сервера`.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveDeparturesResponseSchema"
                },
                "example": {
                  "active_departures": [
                    {
                      "delivery_type": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "warehouse_name": "Київ",
                      "driver": {
                        "name": "Іван Петренко",
                        "photo_url": "https://cdn.bm.parts/image/workers/abc.jpeg",
                        "phone": null
                      },
                      "car": {
                        "number": "AA1234BB",
                        "name": "Renault Master",
                        "colour": null
                      },
                      "places": 3,
                      "weight": 12.5,
                      "return_money": {
                        "sum": 1500.0,
                        "currency": "ГРН"
                      },
                      "product_returns": false,
                      "message": null,
                      "route": {
                        "points": [
                          {
                            "position": 45,
                            "will_arrive": "2026-08-14T17:05:00Z",
                            "delivery_address": "вул. Львівська 17/15"
                          }
                        ],
                        "start": "2026-08-14T08:00:00Z",
                        "finish": "2026-08-14T18:00:00Z",
                        "progress": 45.0
                      },
                      "ttn": [
                        {
                          "uuid": "B1C2D3E4F5A6789012345678ABCDEF01",
                          "number": "ТТН-12345",
                          "document_type": "00003A4D"
                        }
                      ],
                      "returns": false,
                      "total": null
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "500 без тексту — Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/couriers/departures/count": {
      "get": {
        "tags": [
          "Couriers"
        ],
        "summary": "Отримати кількість активних та архівних виїздів курʼєрів",
        "description": "Повертає лічильники активних і архівних (глибина два дні) виїздів. При помилці вибірки метод віддає `{result: false, waybill_count: null, archived_waybill_count: null}`.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeparturesCountResponseSchema"
                },
                "example": {
                  "waybill_count": 3,
                  "archived_waybill_count": 10
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/wishlist/all_products": {
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити всі товари зі списку обраних",
        "description": "Очищає wishlist. Порожній список — 404 з success=false (обходить хендлер, це НЕ «Ресурс не знайдено»).\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessMessageResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Список обраних очищено."
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Список бажань порожній.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Сталася невідома помилка.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/carriers/warehouses": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Список складів або вулиць за перевізником",
        "description": "За замовчуванням, warehouses.",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "warehouses",
                "streets",
                "all"
              ],
              "default": "warehouses"
            },
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "carrier",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryWarehousesResponseSchema"
                },
                "example": {
                  "warehouses": [
                    {
                      "uuid": "WH000000000000000000000000000001",
                      "name": "Відділення №1",
                      "address": "вул. Хрещатик, 1",
                      "max_weight": 30
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [carrier]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [carrier]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/download/unreserved": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати незарезервовані товари в Excel",
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати незарезервовані товари в Excel",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/wishlist/products": {
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити вибрані товари зі списку обраних",
        "description": "Видалити вибрані товари зі списку обраних",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WishlistDeleteProductsRequestSchema"
              },
              "example": {
                "product_uuids": [
                  "A2D9EC97246EEB0B46877CB5803BFD99"
                ]
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Помилка перевірки параметрів запиту обходить хендлер (success=false)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Список UUID товарів порожній.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessMessageResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Товари видалено зі списку обраних."
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/reserve/process": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Зарезервувати замовлення з кошика",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order_uuid",
                  "warehouse_uuid"
                ],
                "properties": {
                  "order_uuid": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "warehouse_uuid": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingReserveOrderResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "uuid": "8191005056BA39E811EBC9F072221C0D",
                  "analysis": [
                    {
                      "article": "OC47",
                      "brand_code": 182,
                      "brand_name": "BOSCH",
                      "code": "000027828",
                      "name": "Оливний фільтр",
                      "planned": 2,
                      "reserved": 2,
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99"
                    }
                  ],
                  "download_unreserved": null,
                  "saved_unshipped": null,
                  "owner": {
                    "uuid": "812D000C2999A7E611E576524555E66A",
                    "name": "Контрагент",
                    "f": 1
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Зарезервувати замовлення з кошика",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/carrier/cities": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Отримати список міст для перевізника",
        "description": "Повертає список міст обраного регіону. Параметр `carrier` є обов'язковим для обробки запиту, але не звужує список міст за наявністю відділень перевізника.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "carrier",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "is_address",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Якщо параметр передано, повертаються адресні відділення",
            "required": false
          },
          {
            "name": "region",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCitiesResponseSchema"
                },
                "example": {
                  "cities": [
                    {
                      "uuid": "CT000000000000000000000000000001",
                      "name": "Київ"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/import/template": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Шаблони імпорту",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingImportTemplateResponseSchema"
                },
                "example": {
                  "import_types": [
                    {
                      "import_type": "article",
                      "name": "Артикул-Бренд-Кількість",
                      "columns": {
                        "article": "Артикул",
                        "brand": "Бренд",
                        "quantity": "Кол-во"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Шаблони імпорту",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/import/settings": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати збережені налаштування імпорту користувача",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingImportSettingsListResponseSchema"
                },
                "example": {
                  "settings": [
                    {
                      "uuid": "A1B2C3D4E5F6789012345678ABCDEF01",
                      "name": "Мій шаблон",
                      "import_type": "article",
                      "separator": ";",
                      "article_column": 0,
                      "brand_column": 1,
                      "quantity_column": 2
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати збережені налаштування імпорту користувача",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Зберегти налаштування імпорту",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "import_type": {
                    "type": "string",
                    "enum": [
                      "article",
                      "code",
                      "uuid"
                    ]
                  },
                  "separator": {
                    "type": "string"
                  },
                  "article_column": {
                    "type": "string"
                  },
                  "brand_column": {
                    "type": "string"
                  },
                  "code_column": {
                    "type": "string"
                  },
                  "quantity_column": {
                    "type": "string"
                  },
                  "uuid_column": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "cart_uuid": {
                    "type": "string"
                  }
                },
                "required": [
                  "import_type",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSaveImportSettingsResponseSchema"
                },
                "example": {
                  "success": true,
                  "setting": {
                    "uuid": "A1B2C3D4E5F6789012345678ABCDEF01",
                    "name": "Мій шаблон",
                    "import_type": "article",
                    "separator": ";"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Зберегти налаштування імпорту",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити налаштування імпорту",
        "parameters": [
          {
            "name": "setting_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Видалити налаштування імпорту",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/config/confirm": {
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Підтвердження створення налаштування доставки",
        "description": "Підтверджує SMS-код активації налаштування доставки в 1С. Неправильний код — 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "client_uuid": {
                    "type": "string",
                    "description": "UUID пов'язаного контрагента"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Fa-f0-9]{2}(?:-[A-Fa-f0-9]{2}){3}$",
                    "example": "AB-12-CD-34",
                    "description": "Латинські hex-символи, чотири пари через дефіс"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Помилка. Код введено неправильно.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка. Код введено неправильно.",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryConfirmConfigResponseSchema"
                },
                "example": {
                  "success": true,
                  "error": false,
                  "message": null,
                  "config": {
                    "uuid": "DCFG0000000000000000000000000001",
                    "name": "Нова Пошта, відділення",
                    "address": "вул. Хрещатик, 1",
                    "is_default": true,
                    "return_money": false,
                    "full_insurance": false,
                    "address_delivery": false
                  }
                }
              }
            }
          },
          "201": {
            "description": "Налаштування доставки успішно підтверджено\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryConfirmConfigResponseSchema"
                },
                "example": {
                  "success": true,
                  "error": false,
                  "message": null,
                  "config": {
                    "uuid": "DCFG0000000000000000000000000001",
                    "name": "Нова Пошта, відділення"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/config/default": {
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Встановити налаштування доставки за замовчуванням",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "config_uuid"
                ],
                "properties": {
                  "config_uuid": {
                    "type": "string",
                    "description": "ID налаштування доставки"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliverySetDefaultResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Встановити налаштування доставки за замовчуванням",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/table/err_file": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Завантажити файл з необробленими рядками при імпорті",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Завантажити файл з необробленими рядками при імпорті",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/table/preload": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Попереднє завантаження та розпізнавання файлу імпорту",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "separator": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingTablePreloadResponseSchema"
                },
                "example": {
                  "table": [
                    {
                      "row_index": 1,
                      "row": [
                        {
                          "col_index": 0,
                          "value": "OC47"
                        },
                        {
                          "col_index": 1,
                          "value": "BOSCH"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Непідтримуваний тип файлу.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Непідтримуваний тип файлу.",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Попереднє завантаження та розпізнавання файлу імпорту",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/table/import": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Імпорт замовлень з Excel або CSV до кошика",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "import_type": {
                    "type": "string"
                  },
                  "separator": {
                    "type": "string"
                  },
                  "article_column": {
                    "type": "string"
                  },
                  "brand_column": {
                    "type": "string"
                  },
                  "code_column": {
                    "type": "string"
                  },
                  "quantity_column": {
                    "type": "string"
                  },
                  "uuid_column": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "cart_uuid": {
                    "type": "string"
                  }
                },
                "required": [
                  "import_type",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingImportEmptyFileResponseSchema"
                },
                "example": {
                  "error": true,
                  "message": "Файл з товарами не може бути порожнім"
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingImportFromExcelResponseSchema"
                },
                "example": {
                  "cart_uuid": "CART0000000000000000000000000001",
                  "err_rows": [],
                  "success_rows": [
                    {
                      "row_index": 1,
                      "row": [
                        {
                          "col_index": 0,
                          "value": "OC47"
                        }
                      ]
                    }
                  ],
                  "error": false,
                  "err_file": null
                }
              }
            }
          },
          "422": {
            "description": "Не вдалося прочитати файл, помилка кодування",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не вдалося прочитати файл, помилка кодування",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Імпорт замовлень з Excel або CSV до кошика",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/carts/count": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Кількість кошиків користувача",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartCountResponseSchema"
                },
                "example": {
                  "carts_count": 3
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Кількість кошиків користувача",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/carts/union": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Об'єднати кілька кошиків в один",
        "description": "Створює НОВИЙ кошик, переносить у нього товари з `carts_array` і позначає вихідні кошики як видалені (marked). Не зливає товари в перший кошик зі списку. Якщо немає жодного валідного UUID, який належить холдингу, 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "carts_array"
                ],
                "properties": {
                  "carts_array": {
                    "type": "array",
                    "description": "Список UUID кошиків для об'єднання",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingUnionCartsResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Необхідно передати, хоча б один вірний ID корзини",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/city/streets": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Отримати назву вулиці міста",
        "description": "Отримати назву вулиці міста",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "street",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryStreetsResponseSchema"
                },
                "example": {
                  "streets": [
                    "Хрещатик",
                    "Саксаганського"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [city]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [city]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/currencies/rates": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Поточні курси валют",
        "description": "Поточні курси валют",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceCurrencyRatesResponseSchema"
                },
                "example": {
                  "rates": [
                    {
                      "currency_name": "USD",
                      "rate": 41.25,
                      "priority": 1
                    },
                    {
                      "currency_name": "EUR",
                      "rate": 44.8,
                      "priority": 2
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/currencies/list": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Список валют",
        "description": "Список валют",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceCurrencyListResponseSchema"
                },
                "example": {
                  "currencies": [
                    {
                      "uuid": "A358000C2947F7AE11E23F5617780B17",
                      "name": "USD"
                    },
                    {
                      "uuid": "A358000C2947F7AE11E23F5617780B18",
                      "name": "EUR"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/contracts/list": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Список договорів контрагента",
        "description": "Список договорів контрагента",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceContractListResponseSchema"
                },
                "example": {
                  "contracts": [
                    {
                      "uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                      "name": "Основний договір",
                      "code": "00001234",
                      "allowed_days": 14,
                      "allowed_sum": 100000.0,
                      "total": 15230.5
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/contract/{contract_uuid}": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Інформація про договір",
        "description": "Повертає дозвіл на відвантаження, кредит, платіжний календар і ліміти договору. Path `default` бере договір поточного контрагента. Невалідний UUID — 422. Договір не з холдингу або порожня вибірка — 404 без тексту; обробник 404 завжди віддає `Ресурс не знайдено`.\n",
        "parameters": [
          {
            "name": "contract_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UUID договору або `default`."
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceContractDetailResponseSchema"
                },
                "example": {
                  "shipment": {
                    "allowed": true,
                    "error": false,
                    "message": "",
                    "processing_possible": true
                  },
                  "credit": {
                    "client_total": 15230.5,
                    "total": 15230.5,
                    "currency": "UAH"
                  },
                  "payment_terms": [
                    {
                      "payment_day": "2024-03-29T00:00:00",
                      "balance": 1200.0,
                      "balance_cumulative": 1200.0
                    }
                  ],
                  "info": {
                    "uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                    "name": "Основний договір",
                    "allowed_days": 14,
                    "control_days": true,
                    "allowed_sum": 100000.0,
                    "control_sum": true,
                    "available_days": 10,
                    "exceeded_days": 0,
                    "available_sum": 84769.5,
                    "exceeded_sum": 0
                  }
                }
              }
            }
          },
          "404": {
            "description": "Договір не знайдено. 404 без тексту — обробник завжди повертає `Ресурс не знайдено`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний contract_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [contract_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/payment/link": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "Посилання на оплату",
        "description": "Посилання на оплату особового рахунку в Privat24.",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancePaymentLinkResponseSchema"
                },
                "example": {
                  "link": "https://www.privat24.ua/rd2/my_payments_create/abc"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Некоректний client_uuid холдингу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметру [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/finance/payment/qr": {
      "get": {
        "tags": [
          "Finance"
        ],
        "summary": "QR код для оплати",
        "description": "Повертає PNG із QR-кодом на сторінку оплати Privat24. Опційний `client_uuid` має належати холдингу, інакше 422 від `bound_client_data` (`Вказано некоректне значення параметру [client_uuid]`).\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "<binary PNG QR image>"
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Некоректний client_uuid холдингу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметру [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/cars/brands/": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Список автомобільних марок",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 24
            },
            "description": "Пошук за назвою автомобільної марки",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Список автомобільних марок",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarBrandsResponseSchema"
                },
                "example": {
                  "car_brands": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "BMW",
                      "code": "BMW",
                      "marked": false,
                      "models_url": "https://api.bm.parts/catalog/cars/brand/A2D9EC97246EEB0B46877CB5803BFD99/models/"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку марок автомобілів. Параметр `q` фільтрує за назвою; рядок довжиною 25 і більше символів дає 422 з типовим текстом хендлера.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/service_station/calculate_amount": {
      "post": {
        "tags": [
          "Claims"
        ],
        "summary": "Визначити вартість робіт",
        "description": "Розрахувати вартість виїзду та робіт сервісної станції.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimsCalculateAmountRequestSchema"
              },
              "example": {
                "location": "A2D9EC97246EEB0B46877CB5803BFD99",
                "equipment": {
                  "uuid": "81F4005056AC66D611EAD7173350C7AA",
                  "qnt": 2,
                  "type_of_work": "92E6005056BA7D7A11ED512AD24DEA89"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsCalculateAmountResponseSchema"
                },
                "example": {
                  "total": 4500.0
                }
              }
            }
          },
          "422": {
            "description": "Некоректні параметри розрахунку",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення [equipment]",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/service_station/types_of_work": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Отримати типи робіт",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsTypesOfWorkResponseSchema"
                },
                "example": {
                  "types_of_work": [
                    {
                      "name": "Монтаж",
                      "uuid": "81F4005056AC66D611EAD7173350C7AA"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати типи робіт",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/service_station/equipment": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Отримати типи обладнання",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsEquipmentResponseSchema"
                },
                "example": {
                  "equipment": [
                    {
                      "name": "Діагностика",
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "qnt": 10,
                      "types_of_work": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати типи обладнання",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/history": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Історія пошуку по товарах",
        "responses": {
          "200": {
            "description": "Історія пошукових фраз",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchHistoryResponseSchema"
                },
                "example": {
                  "history": [
                    {
                      "search_string": "амортизатор",
                      "searched_at": "2026-08-14T10:15:00",
                      "is_vin": false,
                      "car_model": null,
                      "not_found": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає історію пошукових фраз поточного користувача: рядок запиту, час, VIN та ознаку порожнього результату.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/suggest": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Підказки для пошуку",
        "parameters": [
          {
            "name": "products_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Підказки для пошуку товарів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchSuggestResponseSchema"
                },
                "example": {
                  "suggests": {
                    "A2D9EC97246EEB0B46877CB5803BFD99": {
                      "name": "Оливний фільтр",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                      "new_product": false,
                      "promotion": false,
                      "promos": []
                    }
                  },
                  "search": {
                    "hits": 8
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає короткі підказки товарів за рядком `q` для автодоповнення пошуку.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/groups": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Дерево товарних груп",
        "responses": {
          "200": {
            "description": "Дерево товарних груп",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchGroupsResponseSchema"
                },
                "example": {
                  "groups": [
                    {
                      "name": "Двигун",
                      "path": "Двигун",
                      "products_count": 1500,
                      "default_image": null,
                      "partners_catalogs": null,
                      "children": [
                        {
                          "name": "Фільтри",
                          "path": "Двигун/Фільтри",
                          "products_count": 240,
                          "default_image": null,
                          "partners_catalogs": null,
                          "children": null
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає дерево товарних груп (вузлів каталогу) для поточної пошукової вибірки.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/product/error_types": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Отримати список типів помилок пов'язаних з товаром",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClaimsProductErrorItemSchema"
                  }
                },
                "example": [
                  {
                    "key": "c4c1ae6d-2911-4763-ba88-3af8c8d6b47f",
                    "value": "Невірний аналог"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати список типів помилок пов'язаних з товаром",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issues/priorities/": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Типи пріоритетів",
        "description": "Повертає список доступних пріоритетів.",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsPrioritiesResponseSchema"
                },
                "example": {
                  "priorities": [
                    {
                      "id": "8b700f24-f46b-1410-ee8c-0050ba5d6c38",
                      "description": "Високий"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issues/types": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Типи задач",
        "description": "Повертає список доступних типів для задач.",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsTypesResponseSchema"
                },
                "example": {
                  "types": [
                    {
                      "id": "09a8395d-9d8d-4651-8b82-0670a151dd0d",
                      "description": "Скарга на менеджера"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/import_template_file": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Шаблон Excel файлу для імпорту товарів на повернення",
        "responses": {
          "201": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Шаблон Excel файлу для імпорту товарів на повернення",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/detection_cases": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Обставини виявлення несправності",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsDetectionCasesResponseSchema"
                },
                "example": {
                  "detection_cases": [
                    {
                      "uuid": "B5CAA78769F881864B054462F1187D13",
                      "name": "До встановлення"
                    },
                    {
                      "uuid": "8CEAF8339962E9E146E56E87BC588D02",
                      "name": "Під час встановлення"
                    },
                    {
                      "uuid": "A3995C4B60A015634FB6DDF2A47FC0B1",
                      "name": "Під час використання"
                    },
                    {
                      "uuid": "B80DACC83C292B7244209C2F634FB54C",
                      "name": "Інші товари"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Обставини виявлення несправності",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/quick_filters": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Отримати список швидких фільтрів для повернення товарів",
        "description": "Отримати список швидких фільтрів для повернення товарів",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsQuickFiltersResponseSchema"
                },
                "example": {
                  "quick_filters": [
                    {
                      "id": "all",
                      "name": "Всі",
                      "enabled_tags": [],
                      "enabled_types": [
                        "returns"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/reclamations": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Акти рекламації",
        "description": "За замовчуванням записи сортуються за спаданням. `product_uuid` та `sales_doc_uuid` присутні лише у чернетках (`is_draft=true`). Поле `photo_or_video` застаріле. Поле `sales_doc.owner.number` залишено для сумісності; використовуйте `sales_doc.owner.code`.\n",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsReclamationsListResponseSchema"
                },
                "example": {
                  "acts": [
                    {
                      "uuid": "RA000000000000000000000000000001",
                      "number": "РК000123",
                      "quantity": 1,
                      "is_draft": false,
                      "created_at": "2026-08-14T12:00:00Z",
                      "comment": "Перевірити дефект",
                      "photo_or_video": false,
                      "car_brand": "Volkswagen",
                      "car_model": "Golf",
                      "car_number": "AA1234AA",
                      "car_code": "WVWZZZ1KZ6W000001",
                      "car_engine": "CAXA",
                      "prod_year": "2018",
                      "installation_at": "2026-07-01T00:00:00Z",
                      "disassembling_at": "2026-08-01T00:00:00Z",
                      "odometer_start": 100000,
                      "odometer_end": 101500,
                      "defect_description": "Сторонній шум",
                      "defect_cause": "Виробничий дефект",
                      "diagnostic_equipment": "Діагностичний стенд",
                      "defect_detection_case": "DC000000000000000000000000000001",
                      "partner_name": "СТО Приклад",
                      "partner_address": "м. Київ, вул. Прикладна, 1",
                      "partner_phone": 380501234567,
                      "partner_unit": "Майстер Іваненко",
                      "reject_cause": null,
                      "sale_doc_product": {
                        "quantity": 1,
                        "price": 325.5
                      },
                      "product": {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "article": "OC47",
                        "name": "Оливний фільтр",
                        "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                        "brand": {
                          "uuid": "B1000000000000000000000000000001",
                          "name": "BOSCH"
                        }
                      },
                      "sales_doc": {
                        "uuid": "8191005056BA39E811EBC9F072221C0D",
                        "number": "РН001234",
                        "document_url": "{base_url}/documents/{type}/{uuid}",
                        "document_name": "Видаткова накладна",
                        "type": "0000013C",
                        "currency": {
                          "name": "ГРН"
                        },
                        "owner": {
                          "uuid": "CL000000000000000000000000000001",
                          "name": "ТОВ Приклад",
                          "code": "12345678",
                          "number": "12345678"
                        }
                      },
                      "attachments": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/reclamation": {
      "post": {
        "tags": [
          "Return Products"
        ],
        "summary": "Створити Акт рекламації",
        "description": "Створює акт рекламації в 1С. Помилка 1С дає 500 з текстом error з відповіді. Успіх — 201.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_draft": {
                    "type": "boolean",
                    "description": "Зберегти дані як чернетку"
                  },
                  "attachments": {
                    "type": "array",
                    "description": "Посилання на фото або відео дефекту",
                    "items": {
                      "type": "string",
                      "description": "Вкажіть коректне посилання"
                    }
                  },
                  "car_brand": {
                    "type": "string",
                    "description": "Марка автомобіля"
                  },
                  "car_model": {
                    "type": "string",
                    "description": "Модель автомобіля"
                  },
                  "car_number": {
                    "type": "string",
                    "description": "Державний номер автомобіля"
                  },
                  "car_code": {
                    "type": "string",
                    "description": "VIN-код автомобіля"
                  },
                  "car_engine": {
                    "type": "string",
                    "description": "Модель або номер двигуна"
                  },
                  "prod_year": {
                    "type": "string",
                    "description": "Рік виробництва автомобіля"
                  },
                  "installation_at": {
                    "type": "string",
                    "description": "Дата встановлення товару"
                  },
                  "disassembling_at": {
                    "type": "string",
                    "description": "Дата демонтажу товару"
                  },
                  "odometer_start": {
                    "type": "integer",
                    "description": "Пробіг на момент встановлення"
                  },
                  "odometer_end": {
                    "type": "integer",
                    "description": "Пробіг на момент демонтажу"
                  },
                  "defect_description": {
                    "type": "string",
                    "description": "Опис виявленого дефекту"
                  },
                  "defect_cause": {
                    "type": "string",
                    "description": "Ймовірна причина дефекту"
                  },
                  "diagnostic_equipment": {
                    "type": "string",
                    "description": "Використане діагностичне обладнання"
                  },
                  "defect_detection_case": {
                    "type": "string",
                    "description": "UUID обставини виявлення дефекту"
                  },
                  "quantity": {
                    "type": "integer",
                    "description": "Кількість товару в рекламації"
                  },
                  "product_uuid": {
                    "type": "string",
                    "description": "UUID товару"
                  },
                  "partner_name": {
                    "type": "string",
                    "description": "Назва СТО або партнера"
                  },
                  "partner_address": {
                    "type": "string",
                    "description": "Адреса СТО або партнера"
                  },
                  "partner_phone": {
                    "type": "string",
                    "description": "Телефон СТО або партнера"
                  },
                  "sales_doc_uuid": {
                    "type": "string",
                    "description": "UUID документа реалізації"
                  },
                  "partner_unit": {
                    "type": "string",
                    "description": "Відповідальний працівник партнера"
                  }
                },
                "required": [
                  "defect_description",
                  "product_uuid",
                  "quantity",
                  "sales_doc_uuid"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsCreateReclamationResponseSchema"
                },
                "example": {
                  "uuid": "RA000000000000000000000000000001",
                  "number": "РК000123",
                  "document_name": "Заявка на рекламацію"
                }
              }
            }
          },
          "500": {
            "description": "Помилка відповіді 1С",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка створення рекламації",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/returns": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Товари до повернення",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsListResponseSchema"
                },
                "example": {
                  "returns": [
                    {
                      "uuid": "RP000000000000000000000000000001",
                      "quantity": 1,
                      "sold_quantity": 2,
                      "price": 325.5,
                      "updated_at": "2026-08-14T12:00:00Z",
                      "product": {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "article": "OC47",
                        "name": "Оливний фільтр",
                        "brand": {
                          "uuid": "B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1",
                          "name": "BOSCH"
                        },
                        "default_image": "https://cdn.bm.parts/photos/oc47.jpg"
                      }
                    }
                  ]
                }
              }
            }
          },
          "560": {
            "description": "Помилка сервера"
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Товари до повернення",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/sold": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Список товарів до повернення з реалізацій",
        "description": "Пошук виконується через `q` за артикулом, назвою або брендом товару, а через `document_number` — за номером реалізації. `reason=returns` повертає товари для повернення, `reason=reclamations` — для акта рекламації.\n",
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "returns",
                "reclamations"
              ],
              "default": "returns"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "document_number",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Артикул, назва або бренд товару",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsSoldResponseSchema"
                },
                "example": {
                  "products": [
                    {
                      "price": 325.5,
                      "quantity": 2,
                      "product": {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "article": "OC47",
                        "name": "Оливний фільтр",
                        "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                        "multiplicity": 1
                      },
                      "document": {
                        "uuid": "8191005056BA39E811EBC9F072221C0D",
                        "number": "РН001234",
                        "type": "0000013C"
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [client_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "560": {
            "description": "Помилка сервера"
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/promo_types": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Типи промо-акцій",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromoTypeItemSchema"
                  }
                },
                "example": [
                  {
                    "key": "current",
                    "value": "Дійсні"
                  },
                  {
                    "key": "archived",
                    "value": "Архівні"
                  },
                  {
                    "key": "all",
                    "value": "Всі"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає список типів промо-акцій для фільтра `filter`: current (дійсні), archived (архівні) та all (усі).",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/promo_kinds": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Види промо-акцій",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromoKindItemSchema"
                  }
                },
                "example": [
                  {
                    "uuid": "all",
                    "name": "Всі"
                  },
                  {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "name": "ІТП"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає види промо-акцій з довідника, доповнені пунктом «Всі» (uuid=all) для фільтра `kind_uuid`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/banners": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати список банерів",
        "description": "Повертає банери акцій, відфільтровані за `advert`, `banner_code`, `brand` та `group_path` (шлях товарної групи, наприклад «ОЛИВА, ЗМАЗКА І ТЕХНІЧНІ РІДИНИ/Олива по видах»). Невалідний UUID в `advert` дає 422\n",
        "parameters": [
          {
            "name": "advert",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "banner_code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "brand",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "group_path",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BannersListResponseSchema"
                },
                "example": {
                  "banners": [
                    {
                      "banner_url": "https://cdn.bm.parts/promo/home.jpg",
                      "banner_code": "home",
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "has_children": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра advert",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра advert",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/list": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати список акцій",
        "description": "Повертає сторінку рекламних акцій (поточні, архівні або всі) з опційними фільтрами `promo` та `kind_uuid`. Невідомий `kind_uuid` дає 422\n",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "current",
              "enum": [
                "current",
                "archived",
                "all"
              ]
            }
          },
          {
            "name": "show_all",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "promo",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Список UUID акцій для фільтрації",
            "required": false
          },
          {
            "name": "kind_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр за видами акцій",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvertsListResponseSchema"
                },
                "example": {
                  "adverts": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Літня акція",
                      "description": "Опис акції",
                      "begin_at": "2026-06-01T00:00:00Z",
                      "end_at": "2026-08-31T00:00:00Z",
                      "date_to_analyze_from": "2026-06-01T00:00:00Z",
                      "banners": {
                        "home": {
                          "banner_code": "home",
                          "banner_url": "https://cdn.bm.parts/promo/home.jpg",
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99"
                        }
                      },
                      "show_progress": true,
                      "periodicity": 0,
                      "finished": false,
                      "target_type": "EUR",
                      "one_time_gift": false,
                      "is_member": true,
                      "has_children": false,
                      "children_count": 0,
                      "count_of_active_promos": 0,
                      "is_registered": false,
                      "is_pso": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметра [kind_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметра [kind_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/faqs": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати FAQ",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Категорія питань",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaqsResponseSchema"
                },
                "example": {
                  "faqs": [
                    {
                      "id": 1,
                      "category": "promo",
                      "question": "Як взяти участь в акції?",
                      "answer": "Зареєструйтеся на сторінці акції."
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає список частих запитань з зовнішнього контент-сховища. Параметр `category` звужує вибірку за категорією питань.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/nearest_departure": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Отримати найближчий рейс (для Доставки, Нової Пошти та Автостанції)",
        "description": "Отримати найближчий рейс (для Доставки, Нової Пошти та Автостанції)",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingNearestDepartureResponseSchema"
                },
                "example": {
                  "departure": {
                    "name": "Київ ранок",
                    "expired_at": "2026-08-14T10:00:00Z",
                    "key": "KEY123",
                    "route_code": "R001",
                    "route_at": "2026-08-14T08:00:00Z",
                    "departure_at": "2026-08-14T12:00:00Z",
                    "uuid": "KEY123 2026-08-14T08:00:00Z",
                    "is_working_time": true,
                    "message": null,
                    "receipt_at": "2026-08-15T09:00:00Z",
                    "additional": {
                      "delay_days": 0,
                      "is_fastest": true,
                      "is_recommended": false,
                      "text": "Луцьк — Береськ",
                      "departure_start": "2026-08-14T15:20:00Z",
                      "departure_end": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/cancel_orders": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Скасувати замовлення",
        "description": "Скасовує замовлення в обробці через 1С. Порожній orders_array — 422. Жодного валідного UUID — 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orders_array": {
                    "type": "array",
                    "description": "UUID замовлень для скасування",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "orders_array"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingCancelOrdersResponseSchema"
                },
                "examples": {
                  "canceled": {
                    "summary": "Замовлення скасовано",
                    "value": {
                      "result": true,
                      "error": null,
                      "orders": [
                        {
                          "canceled": true,
                          "message": "Відмінено",
                          "number": "ДГ001464931",
                          "uuid": "81BF005056BA39E811ED327993FB7204"
                        }
                      ]
                    }
                  },
                  "not_found": {
                    "summary": "UUID замовлення не знайдено в обліковій системі",
                    "value": {
                      "result": true,
                      "error": null,
                      "orders": [
                        {
                          "canceled": false,
                          "message": "Не знайдено документ в ВМС",
                          "number": "ДГ001464930",
                          "uuid": "81BF005056BA39E811ED329CE23DD2F5"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний orders_array",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing": {
                    "summary": "Необхідно передати значення параметру orders_array",
                    "value": {
                      "message": "Необхідно передати значення параметру orders_array",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid": {
                    "summary": "Необхідно передати коректний список замовлень",
                    "value": {
                      "message": "Необхідно передати коректний список замовлень",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/departures": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Отримати список доступних виїздів",
        "description": "Повертає найближчі рейси для пари delivery_config + warehouse. Невалідний UUID будь-якого з параметрів дає 422 без тексту. Неіснуючий delivery_config / warehouse — 422 з текстами хелперів. Невалідний client_uuid — 422 з текстом wrapper.\n",
        "parameters": [
          {
            "name": "delivery_config",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingDeparturesResponseSchema"
                },
                "example": {
                  "departures": [
                    {
                      "name": "Київ ранок",
                      "expired_at": "2026-08-14T10:00:00Z",
                      "key": "KEY123",
                      "route_code": "R001",
                      "route_at": "2026-08-14T08:00:00Z",
                      "departure_at": "2026-08-14T12:00:00Z",
                      "uuid": "KEY123 2026-08-14T08:00:00Z",
                      "is_working_time": true,
                      "message": null,
                      "additional": {
                        "delay_days": 0,
                        "is_fastest": true,
                        "is_recommended": false,
                        "text": "Експрес-самовивіз",
                        "departure_start": "2026-08-14T14:00:00Z",
                        "departure_end": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Невалідні delivery_config, warehouse або client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "без тексту — UUID не пройшов uuid_pattern",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_delivery": {
                    "summary": "Вказано некоректне значення параметру [delivery_config]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [delivery_config]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_warehouse": {
                    "summary": "Вказано недопустиме значення параметра [warehouse]",
                    "value": {
                      "message": "Вказано недопустиме значення параметра [warehouse]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/documents": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Список документів, доступних для створення претензії по реалізації",
        "description": "Список документів, доступних для створення претензії по реалізації",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "ID Контрагента",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsDocumentsResponseSchema"
                },
                "example": {
                  "documents": [
                    {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "number": "РН-000123",
                      "url": "https://api.bm.parts/documents/0000013C/uuid",
                      "type": "0000013C",
                      "currency_name": "UAH",
                      "total": 15230.5,
                      "created_at": "2026-08-24T14:30:00",
                      "owner": {
                        "uuid": "81ED005056AC66D611EA474924EF8D11",
                        "name": "ТОВ Автосвіт",
                        "code": "12345678",
                        "f": 0
                      }
                    }
                  ]
                }
              }
            }
          },
          "456": {
            "description": "Помилка клієнта"
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/pre_check": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження товарів",
        "description": "Рахує суму масиву products і викликає ShipmentCheck. Порожній products або жодна валідна позиція — 422 з текстами нижче. Невалідний client_uuid або сплячі ФОП — також 422.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "products"
                ],
                "properties": {
                  "products": {
                    "type": "array",
                    "description": "Масив об'єктів з кількістю та uuid-ами товарів для перевірки",
                    "items": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "client_uuid": {
                    "type": "string",
                    "description": "uuid користувача для перевірки доступності відвантаження (необов'язковий)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідний масив products або client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_products": {
                    "summary": "Не вказано значення обов'язкового параметра [products]",
                    "value": {
                      "message": "Не вказано значення обов'язкового параметра [products]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_products": {
                    "summary": "Вказано некоректне значення параметра [products]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [products]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "sleeping_fop": {
                    "summary": "Відвантаження недоступне для неактивних ФОП",
                    "value": {
                      "message": "Відвантаження недоступне для неактивних ФОП",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issues": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Отримати список претензій",
        "description": "Повертає претензії холдингу з пагінацією (`paging_wrapper`: `per_page` за замовчуванням 30, максимум 100; `page`/`per_page` <= 0 або `per_page` > 100 — відповідні тексти 422). Сортування — від найновіших до найстаріших.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsListResponseSchema"
                },
                "example": {
                  "complaints": [
                    {
                      "uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                      "created_at": "2026-08-24T14:30:00",
                      "timer_to_response": null,
                      "title": "Претензія до РН-000123",
                      "reasons": [
                        "Брак"
                      ],
                      "status": {
                        "name": "Нова",
                        "uuid": "81F4005056AC66D611EAD7173350C7AA"
                      },
                      "document_uuid": "8191005056BA39E811EBC9F072221C0D",
                      "comments_count": 0,
                      "can_edit": true,
                      "can_delete": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/causes": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Отримати список причин претензії",
        "description": "Довідник причин претензії (без «Відсутня доставка»). Відповідь кешується на 60 секунд.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsCausesResponseSchema"
                },
                "example": {
                  "complaint_causes": [
                    {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Брак",
                      "code": "defect",
                      "photo_required": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/async": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Асинхронна обробка кошика",
        "description": "Ставить відвантаження кошика в чергу dramatiq. prepare_async_data дає 422 для невалідного cart, відмови у відвантаженні або некоректної трійки cart/delivery_config/warehouse.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "delivery_config",
                  "warehouse",
                  "cart"
                ],
                "properties": {
                  "delivery_config": {
                    "type": "string"
                  },
                  "warehouse": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "expired_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "departure_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "route_code": {
                    "type": "string"
                  },
                  "cart": {
                    "type": "string"
                  },
                  "route_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "save_unprocessed": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingAsyncResponseSchema"
                },
                "example": {
                  "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри асинхронного відвантаження",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_cart": {
                    "summary": "Вказано некоректне значення параметра [cart]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [cart]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "denied": {
                    "summary": "Відмовлено у відвантажені з кошика",
                    "value": {
                      "message": "Відмовлено у відвантажені з кошика",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_triple": {
                    "summary": "Некоректні cart/delivery_config/warehouse",
                    "value": {
                      "message": "Вказано некоректне значення одного з параметрів: [cart], [delivery_config], [warehouse]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/sync": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Відвантажити кошик (синхронно)",
        "description": "Дозволяє сформувати реалізацію з кошика і передати документ в обробку працівникам складу та логістам BM Parts. Після успішного створення документа це відразу відобразиться на боргу і кредитній лінії. Для спрощеного відвантаження опустіть `key`, `departure_at`, `expired_at` і `route_at`. access_shopping_cart робить 422 з success=false, якщо cart_uuid відсутній або некоректний. prepare_sync_data додає 422 для cart, delivery_config, warehouse і відсутності дефолтних налаштувань.\n",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "delivery_config",
                  "warehouse",
                  "cart"
                ],
                "properties": {
                  "delivery_config": {
                    "type": "string",
                    "description": "UUID налаштування доставки"
                  },
                  "warehouse": {
                    "type": "string",
                    "description": "UUID складу відвантаження"
                  },
                  "key": {
                    "type": "string",
                    "description": "Ключ рейсу; необов'язковий для спрощеного відвантаження\n"
                  },
                  "expired_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Час завершення дії ключа рейсу"
                  },
                  "departure_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Час виїзду кур'єра зі складу"
                  },
                  "route_code": {
                    "type": "string",
                    "description": "Код маршруту"
                  },
                  "cart": {
                    "type": "string",
                    "description": "UUID кошика"
                  },
                  "route_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Дата й час рейсу"
                  },
                  "comment": {
                    "type": "string",
                    "description": "Коментар до відвантаження"
                  },
                  "save_unprocessed": {
                    "type": "boolean",
                    "description": "Зберегти невідвантажені товари"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingSyncResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "document": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ПП001325988",
                    "date": "2026-08-14T16:33:32Z",
                    "sum": 951.42,
                    "currency": "ГРН",
                    "type": "000000CC",
                    "url": "https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D",
                    "message": null,
                    "warehouse_address": null
                  },
                  "processing_report": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "article": "OC47",
                      "name": "Оливний фільтр",
                      "brand_code": 182,
                      "brand_name": "BOSCH",
                      "planned": 1,
                      "shipped": 1,
                      "left_until": 0,
                      "reserve": 0,
                      "ordered": 0,
                      "count": 0
                    }
                  ],
                  "changed_prices": null,
                  "saved_unshipped": null,
                  "download_unshipped": null,
                  "delivery_config": null
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingSyncResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "document": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ПП001325988",
                    "date": "2026-08-14T16:33:32Z",
                    "sum": 951.42,
                    "currency": "ГРН",
                    "type": "000000CC",
                    "url": "https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D",
                    "message": null,
                    "warehouse_address": null
                  },
                  "processing_report": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "article": "OC47",
                      "name": "Оливний фільтр",
                      "brand_code": 182,
                      "brand_name": "BOSCH",
                      "planned": 1,
                      "shipped": 1,
                      "left_until": 0,
                      "reserve": 0,
                      "ordered": 0,
                      "count": 0
                    }
                  ],
                  "changed_prices": null,
                  "saved_unshipped": null,
                  "download_unshipped": null,
                  "delivery_config": null
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри відвантаження кошика",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingValidationErrorSchema"
                },
                "examples": {
                  "missing_cart": {
                    "summary": "Необхідно передати значення параметра [cart_uuid]",
                    "value": {
                      "message": "Необхідно передати значення параметра [cart_uuid]",
                      "success": false,
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_cart": {
                    "summary": "Вказано некоректний ID кошика",
                    "value": {
                      "message": "Вказано некоректний ID кошика",
                      "success": false,
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_delivery": {
                    "summary": "Немає delivery_config і дефолту",
                    "value": {
                      "message": "Не вказано параметр [delivery_config], і немає налаштування доставки за замовчуванням",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_warehouse": {
                    "summary": "Немає warehouse і дефолту",
                    "value": {
                      "message": "Не вказано параметр [warehouse], і немає складу за замовчуванням",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "form_error": {
                    "summary": "без тексту (ProcessCartForm)",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/sales_with_products": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Список документів з товарами (спрощений response)",
        "description": "Повертає реалізації (тип 0000013C) з товарами в спрощеному вигляді за періодом і client_uuid. Відсутня організація в договорі, невірний client_uuid / edo_signed / period / direction / пагінація дають 422.\n",
        "parameters": [
          {
            "name": "edo_signed",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "signed",
                "unsigned"
              ],
              "default": "all"
            },
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр по номеру документу",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsSalesWithProductsResponseSchema"
                },
                "example": {
                  "documents": [
                    {
                      "document_uuid": "8191005056BA39E811EBC9F072221C0D",
                      "number": "РН001234",
                      "created_at": "2026-08-14T12:00:00Z",
                      "total": 951.42,
                      "currency": {
                        "name": "UAH"
                      },
                      "carrier": {
                        "uuid": "B4466E1779A2E30B435620CEA0330826",
                        "name": "Нова Пошта"
                      },
                      "ttn_status": {
                        "status": "У дорозі",
                        "period": "2026-08-14T15:30:00Z"
                      },
                      "delivery_config": {
                        "name": "Нова Пошта, відділення №1"
                      },
                      "products": [
                        {
                          "quantity": 2,
                          "price": 475.71,
                          "total": 951.42,
                          "product": {
                            "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                            "article": "OC47",
                            "name": "Оливний фільтр",
                            "name_for_invoice": "Оливний фільтр",
                            "default_image": "https://images.bm.parts/OC47.jpg",
                            "brand": {
                              "uuid": "B1000000000000000000000000000001",
                              "name": "BOSCH"
                            }
                          },
                          "uct_zed": [
                            {
                              "code": "842123",
                              "quantity": 2,
                              "is_imported": true
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри списку продажів з товарами",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_org": {
                    "summary": "У договорі не вказано організацію. Зверніться до менеджера",
                    "value": {
                      "message": "У договорі не вказано організацію. Зверніться до менеджера",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_edo_signed": {
                    "summary": "Недопустиме значення параметру [edo_signed]",
                    "value": {
                      "message": "Недопустиме значення параметру [edo_signed]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "date_limit": {
                    "summary": "Діапазон дат виходить за межі допустимого.",
                    "value": {
                      "message": "Діапазон дат виходить за межі допустимого.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/decode_barcode": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Перетворення даних штрихкоду документа в UUID цього документа",
        "description": "Декодує штрихкод документа в UUID. Порожній barcode дає 422 з текстом нижче.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "barcode"
                ],
                "properties": {
                  "barcode": {
                    "type": "string",
                    "description": "Дані штрихкоду документа"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsDecodeBarcodeResponseSchema"
                },
                "example": {
                  "uuid": "8191005056BA39E811EBC9F072221C0D",
                  "result": true,
                  "message": "Штрихкод успішно перетворено"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Необхідно передати значення параметра [barcode]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/trainings/register": {
      "post": {
        "tags": [
          "Trainings"
        ],
        "summary": "Реєстрація учасника на тренінг",
        "description": "Реєструє учасника. Поля name і surname приймають лише літери (та пробіл/дефіс); position обов'язкове, ліміт 150 символів. Невдала WTForms-валідація повертає HTTP 200 `{success: false, message: Некоректні дані форми}`. Тренінг не знайдено / не posted / немає key-лінії — 404 без тексту (`Ресурс не знайдено`). Реєстрація закрита — 200 `{success: false, message: Реєстрацію на цей тренінг закрито}`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "training_uuid": {
                    "type": "string",
                    "description": "Необхідно вказати ID тренінгу"
                  },
                  "full_name": {
                    "type": "string",
                    "description": "Довжина поля не повинна перевищувати 150 символів"
                  },
                  "name": {
                    "type": "string",
                    "description": "Лише літери (та пробіл/дефіс); макс. 74 символи\n"
                  },
                  "surname": {
                    "type": "string",
                    "description": "Лише літери (та пробіл/дефіс); макс. 75 символів\n"
                  },
                  "position": {
                    "type": "string",
                    "description": "Обов'язкове; довжина не повинна перевищувати 150 символів\n"
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "Необхідно вказати номер телефону учасника."
                  },
                  "company": {
                    "type": "string",
                    "description": "Довжина поля не повинна перевищувати 250 символів"
                  }
                },
                "required": [
                  "training_uuid",
                  "full_name",
                  "name",
                  "surname",
                  "position",
                  "phone_number",
                  "company"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingActionResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Учасника успішно зареєстровано"
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/grouped": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Журнал документів згрупований за датами",
        "description": "Той самий журнал, що `/documents/list`, але записи згруповані за датою створення. Невалідний type / group, відсутня організація, невірний client_uuid, edo_signed, period, direction або пагінація дають 422 з текстом помилки.\n",
        "parameters": [
          {
            "name": "edo_signed",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "signed",
                "unsigned"
              ],
              "default": "all"
            },
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр за типом документу.",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр за номером документу",
            "required": false
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр за групою документів",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsGroupedResponseSchema"
                },
                "example": {
                  "documents": {
                    "2026-08-14": [
                      {
                        "number": "РН001234",
                        "document_type": "0000013C",
                        "total": 951.42
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні фільтри згрупованого журналу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_doc_type": {
                    "summary": "Некоректний формат фільтра документів [type]",
                    "value": {
                      "message": "Невірний формат фільтру документів [00000000]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_group": {
                    "summary": "Невірний формат фільтра group [%(type_group)s]",
                    "value": {
                      "message": "Невірний формат фільтра group [unknown]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_org": {
                    "summary": "У договорі не вказано організацію. Зверніться до менеджера",
                    "value": {
                      "message": "У договорі не вказано організацію. Зверніться до менеджера",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "date_limit": {
                    "summary": "Діапазон дат виходить за межі допустимого.",
                    "value": {
                      "message": "Діапазон дат виходить за межі допустимого.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/list": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Список документів",
        "description": "Повертає сторінку журналу документів контрагента (або холдингу) за періодом, типом, групою, номером і статусом підпису ЕДО. 404 тут не викликається з view. Невалідний type / group, відсутня організація в договорі, невірний client_uuid, edo_signed, direction, period або пагінація дають 422 з текстом помилки.\n",
        "parameters": [
          {
            "name": "edo_signed",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "signed",
                "unsigned"
              ],
              "default": "all"
            },
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр за типом документа, за замовчуванням повертаються всі документи",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фильтр по номеру документа",
            "required": false
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фильтр по группе документов",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsListResponseSchema"
                },
                "example": {
                  "documents": [
                    {
                      "number": "РН001234",
                      "document_type": "0000013C",
                      "created_at": "2026-08-14T12:00:00Z",
                      "total": 951.42,
                      "currency": {
                        "name": "UAH"
                      },
                      "warehouse": {
                        "name": "Київ"
                      },
                      "comment": "",
                      "document_url": "https://api.bm.parts/documents/0000013C/8191005056BA39E811EBC9F072221C0D"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні фільтри журналу документів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_doc_type": {
                    "summary": "Некоректний формат фільтра документів [type]",
                    "value": {
                      "message": "Невірний формат фільтру документів [00000000]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_group": {
                    "summary": "Невірний формат фільтра group [%(type_group)s]",
                    "value": {
                      "message": "Невірний формат фільтра group [unknown]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_org": {
                    "summary": "У договорі не вказано організацію. Зверніться до менеджера",
                    "value": {
                      "message": "У договорі не вказано організацію. Зверніться до менеджера",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_edo_signed": {
                    "summary": "Недопустиме значення параметру [edo_signed]",
                    "value": {
                      "message": "Недопустиме значення параметру [edo_signed]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "date_limit": {
                    "summary": "Діапазон дат виходить за межі допустимого.",
                    "value": {
                      "message": "Діапазон дат виходить за межі допустимого.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_datetime": {
                    "summary": "Не валідний datetime",
                    "value": {
                      "message": "Не валідний datetime",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/trainings/list": {
      "get": {
        "tags": [
          "Trainings"
        ],
        "summary": "Отримати список тренінгів",
        "description": "Повертає тренінги з пагінацією та сортуванням. `filter=upcoming|archived|all` (за замовчуванням upcoming). Недопустимий filter — 422 `Недопустиме значення параметру [filter]`. Невалідний direction — 422 без тексту. `page`/`per_page` — повідомлення `paging_wrapper`.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "upcoming",
                "archived",
                "all"
              ],
              "default": "upcoming"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingsListResponseSchema"
                },
                "example": {
                  "trainings": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Тренінг з продажів",
                      "description": "Короткий опис тренінгу",
                      "body": "<p>Програма тренінгу</p>",
                      "location": "Київ, вул. Хрещатик 1",
                      "image_url": "https://cdn.bm.parts/trainings/cover.jpg",
                      "begin_at": "2026-09-01T09:00:00Z",
                      "end_at": "2026-09-01T18:00:00Z",
                      "check_in_before": "2026-08-31T18:00:00Z",
                      "free_places": 12,
                      "duration": 8.0,
                      "places_are_limited": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/change_product": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Замінити один товар у кошику на інший",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "cart_uuid",
                  "from",
                  "to"
                ],
                "properties": {
                  "cart_uuid": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID кошика"
                  },
                  "from": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID товару, який замінюємо"
                  },
                  "to": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID нового товару"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingChangeProductResponseSchema"
                },
                "example": {
                  "success": true,
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметру [from]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметру [from]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Замінити один товар у кошику на інший",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/cart_products": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати залишки товарів з кошика по обраних складах",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика"
          },
          {
            "name": "warehouse",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Список складових UUID",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartProductsResponseSchema"
                },
                "example": {
                  "cart_products": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Оливний фільтр",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "price": 325.5,
                      "quantity": 2,
                      "multiplicity": 1,
                      "sum": 651.0,
                      "in_stocks": {
                        "81F4005056AC66D611EAD7173350C7AA": {
                          "name": "Київ",
                          "quantity": 12,
                          "sum": 651.0
                        }
                      }
                    }
                  ],
                  "total": {
                    "cart": 651.0,
                    "warehouses": {
                      "81F4005056AC66D611EAD7173350C7AA": "651"
                    }
                  },
                  "currency_name": "UAH"
                }
              }
            }
          },
          "422": {
            "description": "Параметр [products] містить недопустимі значення",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Параметр [products] містить недопустимі значення",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати залишки товарів з кошика по обраних складах",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати залишки товарів з кошика по обраних складах",
        "description": "Отримати залишки товарів з кошика по обраних складах (параметри в JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "cart_uuid",
                  "warehouse"
                ],
                "properties": {
                  "cart_uuid": {
                    "type": "string",
                    "description": "UUID кошика"
                  },
                  "warehouse": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Список UUID складів"
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Опційний список UUID товарів для фільтрації"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartProductsResponseSchema"
                },
                "example": {
                  "cart_products": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Оливний фільтр",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "price": 325.5,
                      "quantity": 2,
                      "multiplicity": 1,
                      "sum": 651.0,
                      "in_stocks": {
                        "81F4005056AC66D611EAD7173350C7AA": {
                          "name": "Київ",
                          "quantity": 12,
                          "sum": 651.0
                        }
                      }
                    }
                  ],
                  "total": {
                    "cart": 651.0,
                    "warehouses": {
                      "81F4005056AC66D611EAD7173350C7AA": "651"
                    }
                  },
                  "currency_name": "UAH"
                }
              }
            }
          },
          "422": {
            "description": "Параметр [products] містить недопустимі значення",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Параметр [products] містить недопустимі значення",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/change_owner": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Змінити власника кошика",
        "description": "Передає кошик іншому контрагенту холдингу. Wrapper validate_client_uuid дає 422 для відсутнього або чужого client_uuid.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShoppingCartChangeOwnerRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_client": {
                    "summary": "Необхідно передати параметр [client_uuid]",
                    "value": {
                      "message": "Необхідно передати параметр [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/departures": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Отримати таблицю виїздів",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "warehouse",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryCarrierDepartureSchema"
                  }
                },
                "example": [
                  {
                    "uuid": "C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1",
                    "name": "Нова Пошта",
                    "discount_delivery": 0.0,
                    "discount_money": 0.0,
                    "departures": [
                      {
                        "receipt_date": "2026-08-15",
                        "departure_date": "2026-08-14"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати таблицю виїздів",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/receivers": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Список отримувачів",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryReceiversResponseSchema"
                },
                "example": {
                  "receivers": [
                    {
                      "uuid": "RC000000000000000000000000000001",
                      "full_name": "Іван Петренко",
                      "phone": "+380501234567"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Список отримувачів",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Створити отримувача",
        "description": "Метод повертає статус 201 Created при успішному створенні контактної особи.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "surname",
                  "name",
                  "middle_name",
                  "phone"
                ],
                "properties": {
                  "surname": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "middle_name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCreateReceiverResponseSchema"
                },
                "example": {
                  "receiver": {
                    "uuid": "RC000000000000000000000000000001",
                    "full_name": "Іван Петренко",
                    "phone": "+380501234567"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/carriers": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Список перевізників",
        "description": "Повертає список доступних перевізників з пагінацією.",
        "parameters": [
          {
            "name": "city_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID міста для фільтрації перевізників",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCarriersListResponseSchema"
                },
                "example": {
                  "carriers": [
                    {
                      "uuid": "C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1",
                      "name": "Нова Пошта",
                      "discount_money": 0.0,
                      "discount_delivery": 0.0,
                      "warehouses_url": "https://api.bm.parts/delivery/carriers/warehouses",
                      "warehouses_count": 120,
                      "address_delivery": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/reserves": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати список резервів та замовлень в обробці",
        "parameters": [
          {
            "name": "response_fields",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "reserves",
                "picking"
              ],
              "default": "all"
            },
            "required": false
          },
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingReservesListResponseSchema"
                },
                "example": {
                  "reserves": [
                    {
                      "warehouse_code": 1,
                      "warehouse_name": "Київ",
                      "warehouse_uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "orders": [
                        {
                          "uuid": "8191005056BA39E811EBC9F072221C0D",
                          "number": "РЗ000123",
                          "date": "2026-08-14T10:00:00Z",
                          "sum": 325.5,
                          "shipping_date": "2026-08-15T10:00:00Z",
                          "currency": "UAH",
                          "comment": "",
                          "countrecord": 1,
                          "automatically": false,
                          "status": "В резерві",
                          "carrier": "Доставка",
                          "delivery_date": "0001-01-01T00:00:00Z",
                          "delivery_setting": "Доставка, вул. тестова 1",
                          "route": "",
                          "route_date": "0001-01-01T00:00:00Z",
                          "owner": {
                            "uuid": "812D000C2999A7E611E576524555E66A",
                            "name": "Контрагент",
                            "f": 1
                          }
                        }
                      ]
                    }
                  ],
                  "picking": [
                    {
                      "warehouse_code": 1,
                      "warehouse_name": "Київ",
                      "warehouse_uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "can_edit_delivery": true,
                      "orders": [
                        {
                          "uuid": "8191005056BA39E811EBC9F072221C0D",
                          "number": "РЗ000124",
                          "date": "2026-08-14T10:00:00Z",
                          "sum": 100.0,
                          "shipping_date": "2026-08-15T10:00:00Z",
                          "currency": "UAH",
                          "comment": "",
                          "countrecord": 1,
                          "automatically": false,
                          "status": "В обробці",
                          "carrier": "Самовивіз",
                          "delivery_date": "0001-01-01T00:00:00Z",
                          "delivery_setting": "Самовивіз, Київ",
                          "route": "",
                          "route_date": "0001-01-01T00:00:00Z",
                          "owner": {
                            "uuid": "812D000C2999A7E611E576524555E66A",
                            "name": "Контрагент",
                            "f": 1
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [client_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати список резервів та замовлень в обробці",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити (розрезервувати) резерви",
        "parameters": [
          {
            "name": "orders",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Список UUID резервів для видалення"
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingRemoveReservesResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null
                }
              }
            }
          },
          "422": {
            "description": "Невалідний масив orders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing": {
                    "summary": "Не переданий обов'язковий параметр [orders]",
                    "value": {
                      "message": "Не переданий обов'язковий параметр [orders]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid": {
                    "summary": "Вказано недопустиме значення параметра [orders]",
                    "value": {
                      "message": "Вказано недопустиме значення параметра [orders]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/wishlist": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати список бажаних товарів (Wishlist)",
        "description": "Повертає wishlist з залишками. Невалідний cart_uuid — 422 з success=false. Некоректний UUID складу у фільтрі — 422.\n",
        "parameters": [
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика для підрахунку in_cart",
            "required": false
          },
          {
            "name": "warehouses",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID складу для залишків",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistResponseSchema"
                },
                "example": {
                  "wishlist": {
                    "products_count": 1,
                    "products": [
                      {
                        "product": {
                          "price": "325.50",
                          "currency_name": "UAH",
                          "article": "OC47",
                          "default_image": "photo/oc47.jpeg",
                          "brand": {
                            "uuid": "B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1",
                            "name": "BOSCH"
                          },
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                          "name": "Оливний фільтр",
                          "multiplicity": 1,
                          "in_cart": null,
                          "restricted_delivery": [],
                          "is_paid_delivery": false,
                          "weight": 0.35
                        },
                        "in_stocks": [
                          {
                            "uuid": "81F4005056AC66D611EAD7173350C7AA",
                            "name": "Київ",
                            "quantity": "12"
                          }
                        ],
                        "in_waiting": {
                          "uuid": "-",
                          "name": "Очікується",
                          "quantity": "-"
                        },
                        "in_others": {
                          "uuid": "-",
                          "name": "На інших складах",
                          "quantity": "-"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту обходить хендлер (success=false)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Некоректний UUID кошика.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/regions": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Список областей",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryRegionsResponseSchema"
                },
                "example": {
                  "regions": [
                    {
                      "uuid": "R1R1R1R1R1R1R1R1R1R1R1R1R1R1R1R1",
                      "name": "Київська",
                      "cities_url": "https://api.bm.parts/delivery/region/R1/cities"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Список областей",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/configs": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Налаштування доставки",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "order_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID замовлення, можна передавати декілька (необов’язковий)."
          },
          {
            "name": "product_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID товару (необов’язковий)."
          },
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryConfigsResponseSchema"
                },
                "example": {
                  "configs": [
                    {
                      "uuid": "DCFG0000000000000000000000000001",
                      "name": "Нова Пошта, відділення",
                      "address": "вул. Хрещатик, 1",
                      "is_default": true,
                      "return_money": false,
                      "full_insurance": false,
                      "address_delivery": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Налаштування доставки",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Створення налаштування доставки",
        "description": "Метод повертає 201 Created при успішному створенні налаштування. До успішного запиту `POST /delivery/config/confirm` нове налаштування не відображається у списку `GET /delivery/configs`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "receiver",
                  "city",
                  "carrier"
                ],
                "properties": {
                  "client_uuid": {
                    "type": "string",
                    "description": "UUID пов'язаного контрагента"
                  },
                  "receiver": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "carrier": {
                    "type": "string"
                  },
                  "carrier_warehouse": {
                    "type": "string"
                  },
                  "full_insurance": {
                    "type": "boolean",
                    "default": false,
                    "description": "Повна страховка"
                  },
                  "is_default": {
                    "type": "boolean"
                  },
                  "building": {
                    "type": "string"
                  },
                  "apartment": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "latitude": {
                    "type": "string",
                    "description": "Широта (для адресної доставки)"
                  },
                  "longitude": {
                    "type": "string",
                    "description": "Довгота (для адресної доставки)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Контактна інформація контрагента незаповнена, відправка смс для підтвердження налаштування доставки недоступна.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Контактна інформація контрагента незаповнена, відправка смс для підтвердження налаштування доставки недоступна.",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Налаштування не створено; деталі помилки містяться у відповіді\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCreateConfigResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": null,
                  "config": {
                    "uuid": "DCFG0000000000000000000000000001",
                    "name": "Нова Пошта, відділення",
                    "address": "вул. Хрещатик, 1",
                    "is_default": true,
                    "return_money": false,
                    "full_insurance": false,
                    "address_delivery": false,
                    "restricted_delivery": false,
                    "is_paid_delivery": false
                  }
                }
              }
            }
          },
          "201": {
            "description": "Налаштування створено та очікує підтвердження",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCreateConfigResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": null,
                  "config": {
                    "uuid": "DCFG0000000000000000000000000001",
                    "name": "Нова Пошта, відділення",
                    "is_default": true,
                    "restricted_delivery": false,
                    "is_paid_delivery": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/product": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати інформацію про товар при швидкому відвантаженні",
        "description": "Повертає розрахунок ціни та ваги для одного товару. Поле cart_uuid необов'язкове: якщо його не передавати, потрібно передати shipment_type=single_product.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product"
                ],
                "properties": {
                  "cart_uuid": {
                    "type": "string",
                    "description": "UUID кошика (опційно)"
                  },
                  "shipment_type": {
                    "type": "string",
                    "enum": [
                      "single_product"
                    ],
                    "description": "Обов'язковий замість cart_uuid при швидкому відвантаженні\n"
                  },
                  "product": {
                    "type": "object",
                    "required": [
                      "uuid",
                      "quantity"
                    ],
                    "properties": {
                      "uuid": {
                        "type": "string"
                      },
                      "quantity": {
                        "type": "integer"
                      }
                    }
                  }
                }
              },
              "example": {
                "cart_uuid": "CART0000000000000000000000000001",
                "product": {
                  "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                  "quantity": 2
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingProductInfoResponseSchema"
                },
                "example": {
                  "data": {
                    "product": {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "article": "OC47",
                      "multiplicity": 1,
                      "name": "Оливний фільтр",
                      "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                      "brand": {
                        "uuid": "B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1",
                        "name": "BOSCH"
                      },
                      "restricted_delivery": [],
                      "is_paid_delivery": false
                    },
                    "currency_name": "UAH",
                    "quantity": 2,
                    "price": "325.50",
                    "position_total": "651.00",
                    "in_cart": {
                      "cart_name": "Основний кошик",
                      "brand_name": "BOSCH",
                      "article": "OC47",
                      "quantity": 2
                    },
                    "weight": 0.35
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри товару",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_product": {
                    "summary": "Не передано обов'язковий параметр [product]",
                    "value": {
                      "message": "Не передано обов'язковий параметр [product]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_uuid": {
                    "summary": "Вказано некоректне значення параметра [product.uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [product.uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_qty": {
                    "summary": "Вказано некоректне значення параметра [product.quantity]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [product.quantity]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "not_found": {
                    "summary": "Товар не знайдено",
                    "value": {
                      "message": "Товар не знайдено",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_cart": {
                    "summary": "Вказано некоректний ID кошика",
                    "value": {
                      "message": "Вказано некоректний ID кошика",
                      "documentation_url": "https://developer.bm.parts/",
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/track": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Відстежити ТТН",
        "description": "Шукає ТТН за номером перевізника або внутрішнім номером документа. Відсутній tracking_number — 422. Документ не знайдено — 404.\n",
        "parameters": [
          {
            "name": "tracking_number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryTrackParcelResponseSchema"
                },
                "example": {
                  "status": "У дорозі"
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Не передано обов'язковий параметр [tracking_number]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не передано обов'язковий параметр [tracking_number]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/carts": {
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Список кошиків користувача",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartsListResponseSchema"
                },
                "example": {
                  "carts": [
                    {
                      "uuid": "CART0000000000000000000000000001",
                      "name": "Основний кошик",
                      "weight": 1.25,
                      "total": 325.5,
                      "currency_name": "UAH",
                      "products_count": 2,
                      "warehouse": {
                        "uuid": "81F4005056AC66D611EAD7173350C7AA",
                        "name": "Київ"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Список кошиків користувача",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Створити новий кошик",
        "description": "Створює кошик з опційними name, warehouse, client_uuid і products (масив [{uuid, qnt}]). Перевищений ліміт name, невалідний/недоступний warehouse або невалідні products дають 422 з текстами нижче.\n",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShoppingCartCreateRequestSchema"
              },
              "example": {
                "name": "Основний кошик",
                "warehouse": "81F4005056AC66D611EAD7173350C7AA",
                "client_uuid": "812D000C2999A7E611E576524555E66A",
                "products": [
                  {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "qnt": 2
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartCreateResponseSchema"
                },
                "example": {
                  "carts": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри створення кошика",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "name_limit": {
                    "summary": "Перевищено ліміт символів для [name]",
                    "value": {
                      "message": "Перевищено ліміт символів для [name]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_warehouse": {
                    "summary": "Вказано невалідний ID складу [warehouse]=...",
                    "value": {
                      "message": "Вказано невалідний ID складу [warehouse]=00000000000000000000000000000000",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "inaccessible_warehouse": {
                    "summary": "Вказано недоступний ID складу [warehouse]=...",
                    "value": {
                      "message": "Вказано недоступний ID складу [warehouse]=00000000000000000000000000000000",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_products": {
                    "summary": "Некоректні значення в параметрі [products]",
                    "value": {
                      "message": "Некоректні значення в параметрі [products]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/couriers/tags": {
      "get": {
        "tags": [
          "Couriers"
        ],
        "summary": "Отримати список позитивних та негативних тегів",
        "description": "Повертає теги для оцінки водія. При помилці вибірки — `{result: false, tags: {positive: null, negative: null}}`.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourierTagsResponseSchema"
                },
                "example": {
                  "tags": {
                    "positive": [
                      {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "name": "Ввічливий"
                      }
                    ],
                    "negative": [
                      {
                        "uuid": "B1C2D3E4F5A6789012345678ABCDEF01",
                        "name": "Запізнився"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/company/partners_catalogs": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Отримати список партнерських каталогів",
        "description": "Отримати список партнерських каталогів",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPartnersCatalogsResponseSchema"
                },
                "example": {
                  "partners_catalogs": [
                    {
                      "title": "Каталог партнера",
                      "url": "https://partner.example/catalog",
                      "image_url": "https://cdn.bm.parts/partners/logo.png"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/carrier_turnover": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Закупівлі по доставках перевізників",
        "description": "Таблиця обороту по перевізниках за період.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierTurnoverResponseSchema"
                },
                "example": {
                  "grid": [
                    {
                      "row": [
                        "Назва",
                        "Усього, EUR",
                        "Серпень 2026, EUR"
                      ],
                      "inherit_rows": null,
                      "meta": {
                        "header": true
                      }
                    },
                    {
                      "row": [
                        "Разом",
                        1500.0,
                        1500.0
                      ],
                      "inherit_rows": [],
                      "meta": {
                        "header": false
                      }
                    },
                    {
                      "row": [
                        "Нова Пошта",
                        1500.0,
                        1500.0
                      ],
                      "inherit_rows": [
                        [
                          "Відділення",
                          1500.0,
                          1500.0
                        ]
                      ],
                      "meta": {
                        "header": false
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/payment_clients": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Список пов'язаних контрагентів (включаючи поточного), з можливістю перекидання платежів",
        "description": "Повертає пов'язаних контрагентів холдингу з перекиданням платежів (включно з поточним). `clients_as=obj|arr` (за замовчуванням obj); недопустиме значення — 422 від `args_choice_wrapper`. Якщо підлеглих немає, `clients` буде `{}` або `[]`.\n",
        "parameters": [
          {
            "name": "clients_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfilePaymentClientsResponseSchema"
                },
                "example": {
                  "clients": {}
                }
              }
            }
          },
          "404": {
            "description": "Метод недоступний для поточного профілю.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення clients_as",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [clients_as]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/brands_turnover": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Закупівлі по брендах",
        "description": "Таблиця обороту по брендах за період.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandsTurnoverResponseSchema"
                },
                "example": {
                  "grid": [
                    {
                      "row": [
                        "Бренд",
                        "Усього, EUR",
                        "Серпень 2026, EUR"
                      ],
                      "meta": {
                        "header": true,
                        "important": false
                      }
                    },
                    {
                      "row": [
                        "Разом",
                        1500.0,
                        1500.0
                      ],
                      "meta": {
                        "header": false,
                        "important": false
                      }
                    },
                    {
                      "row": [
                        "BOSCH",
                        1500.0,
                        1500.0
                      ],
                      "meta": {
                        "header": false,
                        "important": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/groups_turnover": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Звіт із продажів за категоріями товарів",
        "description": "Дерево категорій товарів із сумами продажів за період та по місяцях. Суми вказані у валюті `currency`. Якщо продажів немає, `groups` — null. Початкова дата має бути в межах останніх 24 місяців.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupsTurnoverResponseSchema"
                },
                "example": {
                  "groups": [
                    {
                      "name": "ІНСТРУМЕНТИ",
                      "path": "ІНСТРУМЕНТИ",
                      "total": 84.89,
                      "periods": [
                        {
                          "label": "Липень 2026",
                          "value": 84.89
                        }
                      ],
                      "children": [
                        {
                          "name": "Набори інструментів",
                          "path": "ІНСТРУМЕНТИ/Набори інструментів",
                          "total": 84.89,
                          "periods": [
                            {
                              "label": "Липень 2026",
                              "value": 84.89
                            }
                          ],
                          "children": [
                            {
                              "name": "Набір ключів комбінованих у валізах",
                              "path": "ІНСТРУМЕНТИ/Набори інструментів/Набір ключів комбінованих у валізах",
                              "total": 84.89,
                              "periods": [
                                {
                                  "label": "Липень 2026",
                                  "value": 84.89
                                }
                              ],
                              "children": null
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "currency": {
                    "uuid": "A358000C2947F7AE11E23F5617780B18",
                    "name": "EUR"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/reconciliation": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Звірка взаєморозрахунків",
        "description": "Повертає звіт звірки взаєморозрахунків за період.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementsReconciliationResponseSchema"
                },
                "example": {
                  "report": {
                    "result": true,
                    "error": null,
                    "contract": "Основний договір",
                    "balance_before": 1000.0,
                    "in_balance": 200.0,
                    "out_balance": 150.0,
                    "balance_after": 1050.0,
                    "currency_name": "EUR",
                    "excel_url": "https://api.bm.parts/reports/download/reconciliation/xlsx",
                    "pdf_url": "https://api.bm.parts/reports/download/reconciliation/pdf",
                    "documents": [
                      {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "created_at": "2026-08-01T12:00:00Z",
                        "type": "00003A4D",
                        "number": "12345",
                        "description": "Товарно-транспортна накладна",
                        "comment": "",
                        "total": 325.5,
                        "currency_name": "EUR",
                        "in_balance": 0.0,
                        "out_balance": 325.5,
                        "after_transaction": 1050.0,
                        "flag": 0.0,
                        "document_url": "https://api.bm.parts/documents/00003A4D/A2D9EC97246EEB0B46877CB5803BFD99"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/payment_report": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Звіт про оплати",
        "description": "Повертає повний звіт по оплатах за період і посилання на XLS-файл.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentReportResponseSchema"
                },
                "example": {
                  "report": {
                    "result": true,
                    "error": null,
                    "data": {
                      "currency_name": "ГРН",
                      "balance": 30000,
                      "balance_plan": 20000,
                      "statuses": [
                        {
                          "name": "Оплачено",
                          "balance": 30000,
                          "balance_plan": 0,
                          "data": [
                            {
                              "name": "Контрагент [000029298]",
                              "uuid": "f0d82e85-dba7-11e9-81e6-005056ac66d6",
                              "balance": 30000,
                              "balance_plan": 0,
                              "documents": [
                                {
                                  "uuid": "1e8348e2-82de-11ee-92fd-005056bad76d",
                                  "created_at": "2023-11-14T13:08:21Z",
                                  "currency_name": "ГРН",
                                  "description": "Плановане надходження грошових коштів",
                                  "number": "ДГ000459163",
                                  "balance": 10000,
                                  "balance_plan": 0
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "excel_url": "https://api.bm.parts/reports/download/payment_report/xls"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/bound_clients": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Список пов'язаних контрагентів (включаючи поточного), крім контрагентів з перекиданням платежів",
        "description": "Повертає пов'язаних контрагентів холдингу разом із поточним, без контрагентів із перекиданням платежів. `clients_as=obj` (за замовчуванням) віддає об'єкт `{uuid: клієнт}`, `arr` — масив. `is_sleeping=1` включає «сплячих», `not_blocked=0` включає заблокованих. Недопустиме значення будь-якого з цих параметрів — 422 від `args_choice_wrapper`.\n",
        "parameters": [
          {
            "name": "clients_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "required": false
          },
          {
            "name": "is_sleeping",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "0"
              ],
              "default": "0"
            },
            "required": false
          },
          {
            "name": "not_blocked",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "0"
              ],
              "default": "1"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clients": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": {
                            "$ref": "#/components/schemas/ProfileBoundClientItemSchema"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ProfileBoundClientItemSchema"
                          }
                        }
                      ],
                      "nullable": true
                    }
                  }
                },
                "example": {
                  "clients": [
                    {
                      "uuid": "81ED005056AC66D611EA474924EF8D11",
                      "name": "ТОВ Автосвіт",
                      "code": "12345678",
                      "f": 0,
                      "main_client": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення query-параметра",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_clients_as": {
                    "summary": "Недопустиме значення параметру [clients_as]",
                    "value": {
                      "message": "Недопустиме значення параметру [clients_as]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_is_sleeping": {
                    "summary": "Недопустиме значення параметру [is_sleeping]",
                    "value": {
                      "message": "Недопустиме значення параметру [is_sleeping]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_not_blocked": {
                    "summary": "Недопустиме значення параметру [not_blocked]",
                    "value": {
                      "message": "Недопустиме значення параметру [not_blocked]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/new_arrivals": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Нові надходження",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Список нових надходжень",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogNewArrivalsResponseSchema"
                },
                "example": {
                  "new_arrivals": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Надходження 14.08.2026",
                      "arrived_at": "2026-08-14T09:00:00",
                      "products_count": 36
                    }
                  ],
                  "search": {
                    "hits": 12
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку документів нових надходжень з кількістю товарів і датою прибуття. Сортування задає параметр `direction`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/company/contact_info": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Контактна інформація про компанію",
        "description": "Контактна інформація про компанію",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyContactInfoResponseSchema"
                },
                "example": {
                  "contact_center": {
                    "phones": [
                      "+38 (096) 647-77-11"
                    ],
                    "phones_extended": [
                      {
                        "operator": "kyivstar",
                        "phone": "+38 (096) 647-77-11"
                      }
                    ],
                    "email": "sales@busmarket.ua",
                    "timetable": [
                      {
                        "days": "Пн-Пт",
                        "time": "09:00 - 19:00"
                      }
                    ],
                    "skypes": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/reclamations": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Звіт по рекламаціях",
        "description": "Акти рекламації за період, відсортовані за датою створення (новіші першими). `return_document` — пов'язаний документ повернення або null. Результат кешується, `calculated_at` — час розрахунку.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReclamationsReportResponseSchema"
                },
                "example": {
                  "documents": [
                    {
                      "uuid": "8200005056BA39E811F1422876E89DE1",
                      "type": "0000415B",
                      "document_name": "Акт рекламації",
                      "created_at": "2026-04-27T14:11:39Z",
                      "number": "000030836",
                      "document_url": "https://api.bm.parts/documents/0000415B/8200005056BA39E811F1422876E89DE1",
                      "state": {
                        "name": "Очікується",
                        "uuid": "A15454B67BDA11F34A8F799A4FBDC924",
                        "description": null
                      },
                      "owner": {
                        "uuid": "81EB005056AC66D611EA2AF9E6FFC455",
                        "name": "Головний [000033425]",
                        "number": "1441101",
                        "f": 1
                      },
                      "return_document": {
                        "uuid": "8200005056BA39E811F1493ED24CF638",
                        "type": "000000C1",
                        "created_at": "2026-05-06T14:28:13Z",
                        "number": "ДГ001197514",
                        "currency_name": "ГРН",
                        "total": 511.44,
                        "document_url": "https://api.bm.parts/documents/000000C1/8200005056BA39E811F1493ED24CF638",
                        "owner": {
                          "uuid": "81EB005056AC66D611EA2AF9E6FFC455",
                          "name": "Головний [000033425]",
                          "number": "1441101",
                          "f": 1
                        },
                        "products": [
                          {
                            "line_num": 1,
                            "price": 511.44,
                            "quantity": 1.0,
                            "total": 511.44,
                            "discount": 0.0,
                            "auto_discount": 0.0,
                            "product": {
                              "uuid": "8E147E6E1215BADD42394FEC4826DD68",
                              "article": "17FI3210",
                              "name": "Наконечник тяги рульової (L) Fiat Ducato 06-",
                              "default_image": "photo\\n\\z\\s\\u\\a\\1d70f023.jpeg",
                              "brand": {
                                "uuid": "812C000C2999A7E611E55EB9C240D5CC",
                                "name": "ASMETAL"
                              }
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "calculated_at": "2026-06-18T17:45:53Z"
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/company/warehouses": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Список складів",
        "description": "Повертає онлайн-склади, доступні контрагенту, з графіком роботи. Query `client_uuid` необов'язковий; порожній рядок або не-UUID — 422. Якщо складів немає — 200 з `warehouses: null` і повідомленням звернутися до менеджера.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Необов'язковий параметр uuid клієнта"
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyWarehousesResponseSchema"
                },
                "example": {
                  "warehouses": [
                    {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ",
                      "short_name": "Київ",
                      "address": "вул. Кирилівська, 1",
                      "latitude": "50.4501",
                      "longitude": "30.5234",
                      "map_link": null,
                      "work_time": [
                        {
                          "days": "Пн-Пт",
                          "times": "09:00 - 18:00"
                        },
                        {
                          "days": "Сб",
                          "times": "09:00 - 15:00"
                        }
                      ],
                      "is_main": true
                    }
                  ],
                  "service": [
                    {
                      "uuid": "waiting",
                      "name": "Очікується"
                    },
                    {
                      "uuid": "other",
                      "name": "Показати на інших складах"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Отримати налаштування клієнтського додатку за логіном користувача",
        "description": "Отримати налаштування клієнтського додатку за логіном користувача",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfilePreferenceGetResponseSchema"
                },
                "example": {
                  "meta": {},
                  "preferences": {
                    "extra": {
                      "interval": [
                        {
                          "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                          "from": 0,
                          "to": 1000,
                          "value": 5
                        }
                      ],
                      "brands": [
                        {
                          "name": "BOSCH",
                          "value": 3
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/returns/products": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Список товарів для повернення",
        "description": "Запитує в 1С перелік товарів поточного контрагента, доступних для повернення за останні 14 днів, і доповнює кожен рядок кратністю з локальної бази.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsProductsResponseSchema"
                },
                "example": {
                  "returning_products": {
                    "result": true,
                    "error": null,
                    "data": [
                      {
                        "code": "000053284",
                        "article": "OC47",
                        "brand_name": "BOSCH",
                        "name": "Оливний фільтр",
                        "count": 3,
                        "multiplicity": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/company/manager": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Інформація про Вашого менеджера",
        "description": "Інформація про Вашого менеджера",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyManagerResponseSchema"
                },
                "example": {
                  "manager": {
                    "name": "Іван Петренко",
                    "email": "manager@bm.parts",
                    "mobile": "+380501234567",
                    "all_mobiles": [
                      "+380501234567"
                    ],
                    "skype": null,
                    "internal": "1234",
                    "photo_url": "https://cdn.bm.parts/promo/managers/ivan.png"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/mailing": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Отримати налаштування розсилок",
        "description": "Отримати з 1С налаштування email-розсилок контрагента.",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileMailingGetResponseSchema"
                },
                "example": {
                  "mailing": [
                    {
                      "uuid": "1C920281C72C11E58139000C2999A7E6",
                      "name": "Прайс-листи",
                      "emails": "user@mail.ua"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Не вдалось отримати налаштування розсилок",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не вдалось отримати налаштування розсилок",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Некоректний client_uuid холдингу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Зберегти налаштування розсилок",
        "description": "Зберігає email-адреси для типів розсилок у 1С. Новий формат тіла — `{mailing_configs: [{config, mails}, ...]}`. `config` містить UUID налаштування, а `mails` — адреси через кому. Не-об'єкт у body — 422 `Некоректний формат тіла запиту. Очікується JSON-об'єкт.`. Невалідні адреси піднімають FormValidationError (422 з `errors`). Невдале збереження в 1С — 500.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mailing_configs"
                ],
                "properties": {
                  "mailing_configs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "config",
                        "mails"
                      ],
                      "properties": {
                        "config": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mails": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileMailingPostResponseSchema"
                },
                "example": {
                  "message": "Налаштування розсилки успішно збережено"
                }
              }
            }
          },
          "422": {
            "description": "Невалідне тіло або email-адреси",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Некоректний формат тіла запиту. Очікується JSON-об'єкт.",
                    "value": {
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_email": {
                    "summary": "FormValidationError — неправильні email",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "1C920281C72C11E58139000C2999A7E6": [
                          "Неправильно вказані адреси електронної пошти"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Не вдалося зберегти налаштування розсилки",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не вдалося зберегти налаштування розсилки",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/history": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Історія пошуку",
        "description": "Повертає історію пошукових запитів поточного контрагента. `filter=vin|phrase|all` (за замовчуванням all). Пагінація через `paging_wrapper`: `page` і `per_page` мають бути > 0, `per_page` не більше 100. Недопустимий `filter` — 422 від `args_choice_wrapper`.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "vin",
                "phrase",
                "all"
              ],
              "default": "all"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSearchHistoryResponseSchema"
                },
                "example": {
                  "history": [
                    {
                      "is_vin": false,
                      "searched_at": "2024-03-15T10:30:00",
                      "not_found": false,
                      "search_string": "OC47",
                      "car_model": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні page, per_page або filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "per_page_max": {
                    "summary": "per_page значення перевищує максимальне (100)",
                    "value": {
                      "message": "per_page значення перевищує максимальне (100)",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "per_page_min": {
                    "summary": "Значення параметра [per_page] має бути більшим за 0",
                    "value": {
                      "message": "Значення параметра [per_page] має бути більшим за 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "page_min": {
                    "summary": "Значення параметра [page] має бути більшим за 0",
                    "value": {
                      "message": "Значення параметра [page] має бути більшим за 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_filter": {
                    "summary": "Недопустиме значення параметру [filter]",
                    "value": {
                      "message": "Недопустиме значення параметру [filter]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/returns": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Звіт по поверненнях",
        "description": "Заявки на повернення, реалізації та акти рекламації за період, по яких є документи повернення, відсортовані за датою створення (новіші першими). Результат кешується, `calculated_at` — час розрахунку.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsReportResponseSchema"
                },
                "example": {
                  "documents": [
                    {
                      "uuid": "8200005056BA39E811F13FE2A76D9059",
                      "type": "0000415D",
                      "document_name": "Заявка на повернення",
                      "created_at": "2026-04-24T16:36:59Z",
                      "number": "000333545",
                      "document_url": "https://api.bm.parts/documents/0000415D/8200005056BA39E811F13FE2A76D9059",
                      "state": {
                        "name": "Непогоджений",
                        "uuid": "AD6E2578EE9640194A397F25A92EFCB0",
                        "description": null
                      },
                      "owner": {
                        "uuid": "9308005056BA7D7A11F095438B55DEC4",
                        "name": "Контрагент [000067193]",
                        "number": "000067193",
                        "f": 1
                      },
                      "products": [
                        {
                          "uuid": "94F121C158DD4DD54ECAA1F71661AF5E",
                          "article": "20031-0010-99",
                          "name": "Олива HIGHTEC 2T SCOOTER M (1L)",
                          "default_image": "photo\\e\\s\\f\\t\\d\\02981564.jpeg",
                          "quantity": 1,
                          "brand": {
                            "uuid": "92E8005056BA7D7A11EE1C01384C1BD0",
                            "name": "ROWE"
                          },
                          "state": {
                            "name": "Отклонен",
                            "uuid": "BFA2534850F3FFD64D3E5410AFC0C586",
                            "description": "Відсутнє маркування постачальника"
                          }
                        }
                      ],
                      "return_documents": [
                        {
                          "uuid": "8200005056BA39E811F1424875092228",
                          "type": "000000C1",
                          "created_at": "2026-04-27T17:50:55Z",
                          "number": "ДГ001197513",
                          "currency_name": "ГРН",
                          "total": 278.46,
                          "document_url": "https://api.bm.parts/documents/000000C1/8200005056BA39E811F1424875092228",
                          "owner": {
                            "uuid": "9308005056BA7D7A11F095438B55DEC4",
                            "name": "Контрагент [000067193]",
                            "number": "000067193",
                            "f": 1
                          },
                          "products": [
                            {
                              "line_num": 1,
                              "price": 278.46,
                              "quantity": 1.0,
                              "total": 278.46,
                              "discount": 0.0,
                              "auto_discount": 0.0,
                              "product": {
                                "uuid": "94F121C158DD4DD54ECAA1F71661AF5E",
                                "article": "20031-0010-99",
                                "name": "Олива HIGHTEC 2T SCOOTER M (1L)",
                                "default_image": "photo\\e\\s\\f\\t\\d\\02981564.jpeg",
                                "brand": {
                                  "uuid": "92E8005056BA7D7A11EE1C01384C1BD0",
                                  "name": "ROWE"
                                }
                              }
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "calculated_at": "2026-06-18T17:45:53Z"
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/returns/request": {
      "post": {
        "tags": [
          "Returns"
        ],
        "summary": "Створити заявку на повернення",
        "description": "Створює заявку на повернення в 1С за масивом позицій `params` (код товару, код причини, кількість). Успішна обробка повертає 201 і дані документа. Порожній `params` або кількість, що не кратна multiplicity товару, дає 422 без тексту — хендлер підставляє стандартне повідомлення.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "params"
                ],
                "properties": {
                  "params": {
                    "type": "array",
                    "description": "[{\"code\": \"000053284\", \"cause_code\": \"000026117\", \"count\": 3}]",
                    "items": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "cause_code": {
                          "type": "string"
                        },
                        "count": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsRequestResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null,
                  "uuid": "8191005056BA39E811EBC9F072221C0D",
                  "number": "ЗВ000123",
                  "status": "Нова",
                  "date": "2026-08-14T12:00:00Z",
                  "countrecord": 1,
                  "document_url": "https://api.bm.parts/documents/0000415D/8191005056BA39E811EBC9F072221C0D"
                }
              }
            }
          },
          "422": {
            "description": "Порожній params або кількість не кратна multiplicity товару (422 без тексту).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/brands": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Список брендів виробників",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 24
            },
            "description": "Регістрозалежний пошук за назвою. Значення потрібно передавати в нижньому регістрі; мінімальна довжина — 2 символи.\n",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Список брендів виробників",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogBrandsListResponseSchema"
                },
                "example": {
                  "brands": [
                    {
                      "name": "BOSCH",
                      "products_count": 134,
                      "new": false
                    }
                  ],
                  "search": {
                    "hits": 120
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку брендів виробників з каталогу. Параметр `q` виконує регістрозалежний пошук за назвою в нижньому регістрі. Мінімальна довжина пошуку — 2 символи; рядок довжиною 25 і більше символів дає 422 з типовим текстом хендлера.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/phones": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Список телефонів поточного контрагента",
        "description": "Список телефонів поточного контрагента",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfilePhonesResponseSchema"
                },
                "example": {
                  "phones": [
                    {
                      "uuid": "81ED005056AC66D611EA474924EF8D11",
                      "name": "ТОВ Автосвіт",
                      "phone": "+38 (050) 123-45-67"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/returns/causes": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Список причин повернення",
        "description": "Повертає довідник активних причин повернення товару (не видалені, онлайн, з ознакою for_returns). Кожна причина містить uuid, назву та код для подальшого створення заявки на повернення.\n",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsCausesResponseSchema"
                },
                "example": {
                  "returning_causes": [
                    {
                      "uuid": "CA000000000000000000000000000001",
                      "name": "Брак",
                      "code": "000026117"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/returns/notify": {
      "post": {
        "tags": [
          "Returns"
        ],
        "summary": "Сповістити про повернення",
        "description": "Надсилає в 1С текстове повідомлення про повернення товару (`ОповеститьОбПоверненняе`). Тіло запиту валідується формою ReturnNotifyForm; невалідні поля дають стандартний 422 від FormValidationError.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsNotifyResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": null
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/terms": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Заборгованість за строками боргу",
        "description": "Повертає звіт за строками боргу на дату `at_date`.\n",
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true,
              "default": null
            },
            "description": "UUID контрагента; якщо параметр не передано, звіт формується для всього холдингу",
            "required": false
          },
          {
            "name": "at_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Одна дата звіту у форматі YYYY-MM-DD",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DebtTermsResponseSchema"
                },
                "example": {
                  "terms": {
                    "contracts": [
                      "Основний договір"
                    ],
                    "debts": [
                      1200.5
                    ],
                    "currency": {
                      "name": "EUR",
                      "code": "978"
                    },
                    "databefore": {
                      "headerbefore": [
                        "0-7",
                        "8-14"
                      ],
                      "blockbefore": [
                        [
                          100.0,
                          50.0
                        ]
                      ],
                      "debt": [
                        100.0,
                        50.0
                      ]
                    },
                    "dataafter": {
                      "headerafter": [
                        "0-7",
                        "8-14"
                      ],
                      "blockafter": [
                        [
                          200.0,
                          30.0
                        ]
                      ],
                      "debt": [
                        200.0,
                        30.0
                      ]
                    },
                    "error": null,
                    "result": true,
                    "currency_name": "EUR"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні at_date або client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_datetime": {
                    "summary": "Не валідний datetime",
                    "value": {
                      "message": "Не валідний datetime",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_format": {
                    "summary": "Невалідний at_date",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Некоректне значення параметру [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/returns/rate": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Отримати відсоток повернень користувача",
        "description": "Рахує відсоток повернень контрагента (і зв'язаних клієнтів холдингу) за період `current` або інший з Config.RETURNS_RATE_ALLOWED_TIME_PERIODS, додає правила штрафів за видом діяльності та рівень severity. Невідомий period дає 422 з текстом нижче.\n",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "current",
                "previous"
              ],
              "default": "current"
            },
            "description": "Період розрахунку",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnsRateResponseSchema"
                },
                "example": {
                  "current_value": 4.25,
                  "severity": "low",
                  "rules": [
                    {
                      "min": 0,
                      "max": 5,
                      "penalty_days": 0
                    }
                  ],
                  "current_penalty_days": 0
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметра [period]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/me": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Дані профілю",
        "description": "Дані профілю поточного контрагента, включно з пов'язаними клієнтами холдингу.",
        "parameters": [
          {
            "name": "clients_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileMeResponseSchema"
                },
                "example": {
                  "uuid": "81ED005056AC66D611EA474924EF8D11",
                  "name": "ТОВ Автосвіт",
                  "code": "12345678",
                  "created_at": "2020-01-15T10:30:00",
                  "registration_at": "2020-01-15T10:30:00",
                  "city_name": "Київ",
                  "city_uuid": "C1000000000000000000000000000001",
                  "region_name": "Київська область",
                  "region_uuid": "R1000000000000000000000000000001",
                  "warehouse_uuid": "81F4005056AC66D611EAD7173350C7AA",
                  "warehouse_name": "Київ",
                  "currency_uuid": "A358000C2947F7AE11E23F5617780B16",
                  "currency_name": "UAH",
                  "docs_status": {
                    "uuid": "verified",
                    "label": "Верифікований"
                  },
                  "is_verified": true,
                  "masq": false,
                  "f": 0,
                  "default_warehouse": {
                    "uuid": "81F4005056AC66D611EAD7173350C7AA",
                    "name": "Київ"
                  },
                  "main_client": true,
                  "contract_uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                  "edo": null,
                  "is_main_login": true,
                  "services": {
                    "chat": false,
                    "image_recognition": false
                  },
                  "bound_clients": null,
                  "payment_clients": {}
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення clients_as",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [clients_as]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/service_station": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Отримати список локацій",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsLocationsResponseSchema"
                },
                "example": {
                  "locations": [
                    {
                      "name": "Київська область",
                      "uuid": "81F4005056AC66D611EAD7173350C7AA"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати список локацій",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/brands/sub_nodes": {
      "get": {
        "tags": [
          "Brands"
        ],
        "summary": "Вузли другого рівня",
        "parameters": [
          {
            "name": "node",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Вузли другого рівня",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandSubNodesListResponseSchema"
                },
                "example": {
                  "sub_nodes": [
                    {
                      "sub_node": "Система зчеплення та її складові",
                      "brands_count": 18
                    }
                  ],
                  "search": {
                    "hits": 120
                  }
                }
              }
            }
          },
          "404": {
            "description": "Не передано обов'язковий параметр `node`. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає підвузли для обов'язкового параметра `node`. Якщо передано невідомий `node`, повертає 200 з `sub_nodes: []` та `search.hits: 0`. Якщо `node` не передано — 404.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Пошук товарів по каталогу",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "search_mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "strict",
                "partial",
                "extended"
              ],
              "default": "extended"
            },
            "description": "Тип пошуку.",
            "required": false
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр по товарній групі (path групи).",
            "required": false
          },
          {
            "name": "gf",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по параметрах груп каталога. Доступний не для всіх товарів, лише для групи каталога. Наприклад `&gf=Максимальна напруга:58V`.\n",
            "required": false
          },
          {
            "name": "save",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Прапорець збереження запиту в історію пошуку. Збереження потребує заповненого `q`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "end_nodes",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтрація по швидкій групі: `&end_nodes=Кронштейн кріплення глушника`.\n",
            "required": false
          },
          {
            "name": "new_arrival",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по новому надходженню (ID нового надходження).",
            "required": false
          },
          {
            "name": "advertisement",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по рекламних акціях (ID акції).",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "new_product",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки нові товари.",
            "required": false
          },
          {
            "name": "promo",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки акційні товари.",
            "required": false
          },
          {
            "name": "tools",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки інструменти та обладнання.",
            "required": false
          },
          {
            "name": "special_offer",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр спеціальних пропозицій.",
            "required": false
          },
          {
            "name": "warehouses",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "UUID складів для залишків. Значення `all` — усі склади. Без параметра — основний склад.\n",
            "required": false
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Валюта цін. Без параметра — валюта договору.",
            "required": false
          },
          {
            "name": "no_discounts",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            },
            "description": "Не враховувати індивідуальні знижки клієнта.",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "products_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів",
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика для кількості в кошику",
            "required": false
          },
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Показувати ціну з націнкою.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Результат пошуку товарів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchProductsResponseSchema"
                },
                "example": {
                  "products": {
                    "A2D9EC97246EEB0B46877CB5803BFD99": {
                      "name": "Оливний фільтр",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                      "new_product": false,
                      "promotion": false,
                      "special_offer": false,
                      "tools": false,
                      "promos": [],
                      "price": "325.50",
                      "currency_name": "UAH",
                      "in_wishlist": false,
                      "in_cart": {
                        "47db3f5e8cc64169a1ec710e93c02f55": 1
                      },
                      "multiplicity": 1,
                      "badges": null,
                      "restricted_delivery": false,
                      "available": true,
                      "found_by": null,
                      "highlight": null,
                      "in_stocks": [
                        {
                          "uuid": "81F4005056AC66D611EAD7173350C7AA",
                          "name": "Київ",
                          "short_name": "Київ",
                          "is_main": true,
                          "has_reserves": false,
                          "quantity": "12",
                          "contract_quantities": [
                            {
                              "f": 1,
                              "quantity": "12"
                            }
                          ]
                        }
                      ],
                      "in_others": {
                        "uuid": "-",
                        "name": "На інших складах",
                        "has_reserves": false,
                        "quantity": "-"
                      },
                      "in_waiting": {
                        "uuid": "-",
                        "name": "Очікується",
                        "has_reserves": false,
                        "quantity": "-"
                      }
                    }
                  },
                  "headers": [
                    {
                      "warehouse": "Київ",
                      "short_name": "Київ",
                      "is_main": true
                    }
                  ],
                  "search": {
                    "hits": 42,
                    "total_pages": 3
                  }
                }
              }
            }
          },
          "400": {
            "description": "Запитана сторінка перевищує доступну кількість",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Запитана сторінка 2 перевищує загальну кількість сторінок (1).",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false,
                  "error": "Некоректно сформований запит",
                  "total_pages": 1
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Товари з індексу не вдалося зіставити з записами в БД. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Шукає товари в каталозі за текстовим запитом і фільтрами (бренди, вузли, бейджі, наявність тощо). Невідомий `badges` дає 422. Сторінка за межами вибірки — 400 з кількістю сторінок.",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Пошук товарів по їх UUID",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "products_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів",
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика для кількості в кошику",
            "required": false
          },
          {
            "name": "warehouses",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "UUID складів для залишків. Значення `all` — усі склади. Без параметра — основний склад.\n",
            "required": false
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Валюта цін. Без параметра — валюта договору.",
            "required": false
          },
          {
            "name": "no_discounts",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            },
            "description": "Не враховувати індивідуальні знижки клієнта.",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchProductsByUuidsRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Результат пошуку товарів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchProductsByUuidResponseSchema"
                },
                "example": {
                  "products": {
                    "A2D9EC97246EEB0B46877CB5803BFD99": {
                      "name": "Оливний фільтр",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                      "new_product": false,
                      "promotion": false,
                      "special_offer": false,
                      "tools": false,
                      "promos": [],
                      "price": "325.50",
                      "currency_name": "UAH",
                      "in_wishlist": false,
                      "in_cart": {
                        "47db3f5e8cc64169a1ec710e93c02f55": 1
                      },
                      "multiplicity": 1,
                      "badges": null,
                      "restricted_delivery": false,
                      "available": true,
                      "in_stocks": [
                        {
                          "uuid": "81F4005056AC66D611EAD7173350C7AA",
                          "name": "Київ",
                          "short_name": "Київ",
                          "is_main": true,
                          "has_reserves": false,
                          "quantity": "12",
                          "contract_quantities": [
                            {
                              "f": 1,
                              "quantity": "12"
                            }
                          ]
                        }
                      ],
                      "in_others": {
                        "uuid": "-",
                        "name": "На інших складах",
                        "has_reserves": false,
                        "quantity": "-"
                      },
                      "in_waiting": {
                        "uuid": "-",
                        "name": "Очікується",
                        "has_reserves": false,
                        "quantity": "-"
                      }
                    }
                  },
                  "headers": [
                    {
                      "warehouse": "Київ",
                      "short_name": "Київ",
                      "is_main": true
                    }
                  ],
                  "search": {
                    "hits": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "Запитана сторінка перевищує доступну кількість",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Запитана сторінка 2 перевищує загальну кількість сторінок (1).",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false,
                  "error": "Некоректно сформований запит",
                  "total_pages": 1
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Товари з індексу не вдалося зіставити з записами в БД. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідне тіло запиту або список UUID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Некоректний формат body запиту. Очікується JSON-об''єкт.",
                    "value": {
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "no_uuids": {
                    "summary": "Не передано коректних UUID товарів",
                    "value": {
                      "message": "Не передано коректних UUID товарів",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "too_many": {
                    "summary": "Максимальна кількість UUID товарів - 100",
                    "value": {
                      "message": "Максимальна кількість UUID товарів - 100",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Шукає товари за списком UUID у тілі запиту (не більше 100 валідних UUID). Порожній або некоректний список дає 422 Сторінка за межами вибірки — 400 з кількістю сторінок.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/suggests": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Універсальні пошукові підказки (товари або авто/VIN)",
        "parameters": [
          {
            "name": "products_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошуковий запит",
            "required": false
          },
          {
            "name": "search_mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "strict",
                "partial",
                "extended"
              ],
              "default": "extended"
            },
            "description": "Тип пошуку.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Підказки: товари або авто/VIN",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchSuggestsResponseSchema"
                },
                "examples": {
                  "products": {
                    "summary": "type=products",
                    "value": {
                      "type": "products",
                      "hits": 8,
                      "products": {
                        "A2D9EC97246EEB0B46877CB5803BFD99": {
                          "name": "Оливний фільтр",
                          "article": "OC47",
                          "brand": "BOSCH",
                          "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                          "new_product": false,
                          "promotion": false,
                          "special_offer": false,
                          "tools": false,
                          "promos": []
                        }
                      }
                    }
                  },
                  "vehicle": {
                    "summary": "type=vehicle",
                    "value": {
                      "type": "vehicle",
                      "found_by": "vin",
                      "vehicle": {
                        "brand": "VOLKSWAGEN",
                        "name": "Caddy",
                        "ssd": "$*...",
                        "vehicleid": "0",
                        "catalog": "VW1221",
                        "model_year": "2007"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "За рядком `q` повертає підказки товарів або дані авто за держномером чи VIN, якщо рядок схожий на держномер.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issues": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Список скарг клієнта",
        "description": "Повертає список звернень поточного клієнта з пагінацією Creatio. Опційний `type` фільтрує тип. `paging_wrapper` дає 422, якщо `per_page` > 100 або `page`/`per_page` <= 0.\n",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "parts_lookup",
                "Запрос",
                "Жалоба",
                "Предложение"
              ]
            },
            "description": "Тип звернення (опціонально)",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsIssuesResponseSchema"
                },
                "example": {
                  "issues": [
                    {
                      "issue_id": "09a8395d-9d8d-4651-8b82-0670a151dd0d",
                      "summary": "CS-123 - Тема",
                      "type": "Запит",
                      "state": "Нове",
                      "priority": "Середній",
                      "comments_count": 2,
                      "attachments_count": 0,
                      "is_resolved": false,
                      "comments_url": "https://api.bm.parts/claims/issue/09a8395d-9d8d-4651-8b82-0670a151dd0d/comments",
                      "attachments_url": "https://api.bm.parts/claims/issue/09a8395d-9d8d-4651-8b82-0670a151dd0d/attachments"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри пагінації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "per_page_max": {
                    "summary": "per_page значення перевищує максимальне (100)",
                    "value": {
                      "message": "per_page значення перевищує максимальне (100)",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "per_page_min": {
                    "summary": "per_page значення не може бути <= 0",
                    "value": {
                      "message": "per_page значення не може бути <= 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "page_min": {
                    "summary": "page значення не може бути <= 0",
                    "value": {
                      "message": "page значення не може бути <= 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Claims"
        ],
        "summary": "Створення звернення",
        "description": "Створює звернення в Creatio. Невдала валідація WTForms піднімає FormValidationError — 422 з `message: Помилка перевірки параметрів запиту` і словником `errors` (наприклад `Короткий опис не повинен перевищувати 150 символів`, `Передано недопустиме значення типу`).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "summary"
                ],
                "properties": {
                  "summary": {
                    "type": "string",
                    "maxLength": 150,
                    "description": "Короткий опис (обов'язковий, до 150 символів)"
                  },
                  "description": {
                    "type": "string",
                    "description": "Детальний опис"
                  },
                  "issue_type": {
                    "type": "string",
                    "description": "Тип задачі (id або parts_lookup)"
                  },
                  "priority": {
                    "type": "string",
                    "description": "Пріоритет задачі"
                  },
                  "user_info": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "callback": {
                    "type": "boolean",
                    "description": "Чи потрібен зворотний дзвінок"
                  },
                  "contacts": {
                    "type": "string"
                  },
                  "product_error_type": {
                    "type": "string",
                    "description": "Тип помилки, пов'язаної з товаром"
                  },
                  "product_uuid": {
                    "type": "string",
                    "description": "UUID товару"
                  },
                  "serial_number": {
                    "type": "string",
                    "description": "Серійний номер товару"
                  },
                  "contact_phone": {
                    "type": "string",
                    "description": "Контактний телефон"
                  },
                  "service": {
                    "type": "object",
                    "description": "Дані сервісного звернення (якщо застосовно)"
                  },
                  "form": {
                    "type": "object",
                    "description": "Додаткові дані форми (наприклад, з сайту)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsCreateIssueResponseSchema"
                },
                "example": {
                  "issue_id": "09a8395d-9d8d-4651-8b82-0670a151dd0d",
                  "due_time": "2024-03-16T12:00:00"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації форми звернення (FormValidationError)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "summary_too_long": {
                    "summary": "Короткий опис довший за 150 символів",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "summary": [
                          "Короткий опис не повинен перевищувати 150 символів"
                        ]
                      }
                    }
                  },
                  "invalid_type": {
                    "summary": "Недопустимий issue_type",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "issue_type": [
                          "Передано недопустиме значення типу"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/badges": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Список бейджів у поточній вибірці товарів",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "search_mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "strict",
                "partial",
                "extended"
              ],
              "default": "extended"
            },
            "description": "Тип пошуку.",
            "required": false
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтр по товарній групі (path групи).",
            "required": false
          },
          {
            "name": "gf",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по параметрах груп каталога. Наприклад `&gf=Максимальна напруга:58V`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "end_nodes",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтрація по швидкій групі: `&end_nodes=Кронштейн кріплення глушника`.\n",
            "required": false
          },
          {
            "name": "new_arrival",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по новому надходженню (ID нового надходження).",
            "required": false
          },
          {
            "name": "advertisement",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по рекламних акціях (ID акції).",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Можливі значення: `dsc`, `exclusive`, `new`, `promo`, `season`, `top` (також `promos`, `reduced_price`, `wholesale`, `discontinued`). Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "new_product",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки нові товари.",
            "required": false
          },
          {
            "name": "promo",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки акційні товари.",
            "required": false
          },
          {
            "name": "special_offer",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр спеціальних пропозицій.",
            "required": false
          },
          {
            "name": "tools",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки інструменти та обладнання.",
            "required": false
          },
          {
            "name": "in_group_catalog",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Показувати тільки товари з групового каталога.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Бейджі у поточній вибірці",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchBadgesResponseSchema"
                },
                "example": {
                  "badges": [
                    "dsc",
                    "exclusive",
                    "new",
                    "promo",
                    "season",
                    "top"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає бейджі товарів, які є в поточній пошуковій вибірці. Невідомий `badges` у фільтрі дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/brands/nodes": {
      "get": {
        "tags": [
          "Brands"
        ],
        "summary": "Вузли верхнього рівня",
        "responses": {
          "200": {
            "description": "Вузли верхнього рівня",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandNodesListResponseSchema"
                },
                "example": {
                  "nodes": [
                    {
                      "node": "ПРИВОД",
                      "brands_count": 42
                    }
                  ],
                  "search": {
                    "hits": 120
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає вузли верхнього рівня каталогу брендів і кількість брендів у кожному вузлі.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/test/": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Тестове прикріплення файлу",
        "responses": {
          "200": {
            "description": "HTML-форма для тестового завантаження",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                },
                "example": "<html><body><form method=\"post\" enctype=\"multipart/form-data\">...</form></body></html>"
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Тестове прикріплення файлу",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/brands/list": {
      "get": {
        "tags": [
          "Brands"
        ],
        "summary": "Список брендів виробників",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "node",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація брендів за вузлами верхнього рівня",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Рядок для фільтрації за назвою",
            "required": false
          },
          {
            "name": "sub_node",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація брендів за вузлами другого рівня. Можна використовувати тільки разом із `node`\n",
            "required": false
          },
          {
            "name": "important",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Якщо `true` — повертає тільки бренди з діючими контрактами, якщо `false` — повертає тільки бренди без контрактів. За замовчуванням показує усі бренди\n",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Список брендів виробників",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandsListResponseSchema"
                },
                "example": {
                  "brands": [
                    {
                      "name": "4-MAX",
                      "products_count": 134,
                      "logo_url": "https://cdn.bm.parts/promo/brands/4-MAX.svg",
                      "new": false,
                      "important": false
                    }
                  ],
                  "search": {
                    "hits": 120
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку брендів виробників. Параметр `q` фільтрує за назвою (25 і більше символів — 422). `sub_node` без `node` також дає 422 з типовим текстом хендлера.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/garage/cars": {
      "get": {
        "tags": [
          "Garage"
        ],
        "summary": "Отримати список авто в гаражі",
        "description": "Повертає автомобілі гаража поточного логіна з пагінацією (`set_default_per_page(100)` + `paging_wrapper`). `per_page` > 100 або `page`/`per_page` <= 0 дають 422 з відповідним текстом.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageCarsResponseSchema"
                },
                "example": {
                  "cars": [
                    {
                      "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                      "created_at": "2024-03-15T10:30:00",
                      "name": "Автомобіль 1",
                      "gov_number": "AA1234BB",
                      "vin_code": "YV1FW7381E1201989",
                      "car": "VOLVO, XC60"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри пагінації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "per_page_max": {
                    "summary": "per_page значення перевищує максимальне (100)",
                    "value": {
                      "message": "per_page значення перевищує максимальне (100)",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "per_page_min": {
                    "summary": "Значення параметра [per_page] має бути більшим за 0",
                    "value": {
                      "message": "Значення параметра [per_page] має бути більшим за 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "page_min": {
                    "summary": "Значення параметра [page] має бути більшим за 0",
                    "value": {
                      "message": "Значення параметра [page] має бути більшим за 0",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/prices/list": {
      "post": {
        "tags": [
          "Prices"
        ],
        "summary": "Отримати прайс в CSV або JSON форматі",
        "description": "Формує прайс товарів у CSV (за замовчуванням) або JSON. До прайса потрапляють тільки товари, для яких є залишок на доступному складі або очікувана кількість при `in_waiting=true`. `products_type` визначає формат значень у `products`: `uuid` або `code`. `id_type` має бути uuid або code, інакше 422. Невідома валюта дає 404.\n",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceListRequestSchema"
              },
              "example": {
                "id_type": "uuid",
                "products_type": "uuid",
                "full_product_name": true,
                "format": "csv",
                "currency": "A358000C2947F7AE11E23F5617780B16",
                "warehouses": [
                  "81F4005056AC66D611EAD7173350C7AA"
                ],
                "brand": [
                  "BOSCH"
                ],
                "car_brand": [
                  "BMW"
                ],
                "in_waiting": false,
                "multiplicity": false,
                "no_discounts": false,
                "show_node_uuid": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Прайс у CSV (за замовчуванням) або JSON (format=json)",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "ІД,Артикул,Бренд,Назва,Ціна UAH,Київ,                Очікується,Кратність,Група UUID,Article,Brand,Name,Price,                81F4005056AC66D611EAD7173350C7AA,-,-,Node A2D9EC97246EEB0B46877CB5803BFD99,OC47,BOSCH,                Фільтр масляний,325.50,12,4,1,                0C0100002947F7AE11E2898EBC9A9048 "
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceListJsonItemSchema"
                  }
                },
                "example": [
                  {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "article": "OC47",
                    "brand": "BOSCH",
                    "name": "Фільтр масляний",
                    "price": "325.50",
                    "in_stocks": [
                      {
                        "uuid": "81F4005056AC66D611EAD7173350C7AA",
                        "name": "Київ",
                        "quantity": 12
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Валюту з указаним UUID не знайдено. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри прайса",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_list": {
                    "summary": "без тексту (не список brand/car_brand тощо)",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_id_type": {
                    "summary": "Недопустиме значення параметра [id_type]",
                    "value": {
                      "message": "Недопустиме значення параметра [id_type]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/garage/car": {
      "post": {
        "tags": [
          "Garage"
        ],
        "summary": "Додати авто в гараж",
        "description": "Додає авто за VIN або держномером (`car_identifier`). Ліміт 100 машин повертається як HTTP 200 `{result: false, error: ...}`. Не знайдений VIN теж 200 з `result: false`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "car_identifier"
                ],
                "properties": {
                  "car_identifier": {
                    "type": "string",
                    "description": "Обов'язковий VIN-код автомобіля або його держ.номер"
                  },
                  "name": {
                    "type": "string",
                    "description": "Назва авто"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageCreateCarResponseSchema"
                },
                "example": {
                  "result": false,
                  "error": "Авто не знайдено"
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageCreateCarResponseSchema"
                },
                "example": {
                  "result": true,
                  "car": {
                    "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                    "created_at": "2024-03-15T10:30:00",
                    "name": "New Car Name",
                    "gov_number": "",
                    "vin_code": "YV1FW7381E1201989",
                    "car": "VOLVO, XC60"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/lists/photos_link": {
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Отримати файл в СSV форматі, який містить ІД, артикул, бренд та посилання на фото",
        "description": "Формує CSV зі посиланнями на фото товарів (ІД, артикул, бренд, URL). Тіло запиту може містити список `brands`; без нього вивантажуються усі бренди.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListsPhotosLinkRequestSchema"
              },
              "example": {
                "brands": [
                  "LuK",
                  "SOLGY"
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "CSV зі посиланнями на фото товарів",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "ІД, Артикул, Бренд, Посилання на фото A2D9EC97246EEB0B46877CB5803BFD99, OC47, BOSCH, https://cdn.bm.parts/photos/oc47.jpg "
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/lists/barcodes": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Отримати файл в JSON форматі, який містить ІД товару, штрих-коди, артикул та бренд",
        "description": "Повертає штрихкоди товарів для обов'язкового списку `brand` (не більше 5 назв). Відсутні, зайві або невідомі бренди дають 422 з текстом\n",
        "parameters": [
          {
            "name": "brand",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Обов'язковий Назви брендів товарів. Максимальна кількість брендів - 5."
          }
        ],
        "responses": {
          "200": {
            "description": "Список товарів зі штрих-кодами",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListsBarcodesResponseSchema"
                },
                "example": {
                  "response": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "article": "OC47",
                      "brand": "BOSCH",
                      "barcodes": [
                        "4052568228341"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний список брендів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_brand": {
                    "summary": "Аргумент \"brand\" є обов''язковим",
                    "value": {
                      "message": "Аргумент \"brand\" є обов'язковим",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "too_many": {
                    "summary": "Максимальна кількість брендів - 5",
                    "value": {
                      "message": "Максимальна кількість брендів - 5",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "not_found": {
                    "summary": "Вказані бренди не знайдені в БД",
                    "value": {
                      "message": "Вказані бренди не знайдені в БД",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/news/list": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "Отримати список новин",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Напрямок сортування",
            "required": false
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ua",
                "en"
              ]
            },
            "description": "Мова відповіді",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsListResponseSchema"
                },
                "example": {
                  "news": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Нова акція BM Parts",
                      "description": "Короткий опис новини",
                      "image_url": "https://cdn.bm.parts/news/cover.jpg",
                      "published_at": "2026-08-01T12:00:00Z",
                      "has_en": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку опублікованих новин мовою `lang` (ua або en) без повного тексту. Англійська вибірка містить лише новини з `has_en`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/cdn/photo": {
      "post": {
        "tags": [
          "CDN"
        ],
        "summary": "Завантажити фотографії на cdn",
        "description": "Завантажує файли з поля `attachments` (multipart) на CDN і повертає посилання. Доступні формати: png, jpg, jpeg, webp, heic. Максимум 5 файлів, до 40 МіБ кожен; весь multipart-запит — до 40 МіБ. Без файлів відповідь 422 з `success: false`. Невалідний формат, кількість або розмір файлів дає 422 з описом помилки; файли не надсилаються до сховища. Помилка сховища — 500 з `success: false`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachments": {
                    "type": "array",
                    "description": "Вкажіть фото для завантаження.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                },
                "required": [
                  "attachments"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CdnPhotoUploadResponseSchema"
                },
                "example": {
                  "success": true,
                  "attachments": [
                    {
                      "name": "photo.jpg",
                      "url": "cdn/box/A2D9EC97246EEB0B46877CB5803BFD99/photo.jpg"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Відсутні файли або порушено обмеження завантаження",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CdnPhotoUploadResponseSchema"
                },
                "example": {
                  "success": false,
                  "message": "Вкажіть фото для завантаження."
                }
              }
            }
          },
          "500": {
            "description": "Помилка під час завантаження фото.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка під час завантаження фото.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "CDN"
        ],
        "summary": "Видалити фото з cdn",
        "description": "Видаляє фото за `photo_url` з query або JSON-тіла. Опційний `document_uuid` також прибирає вкладення з рекламації. Невалідний URL або UUID дає 422\n",
        "parameters": [
          {
            "name": "photo_url",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "url фото, яке потрібно видалити",
            "required": false
          },
          {
            "name": "document_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "uuid документу рекламації",
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo_url": {
                    "type": "string"
                  },
                  "document_uuid": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CdnPhotoDeleteResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри видалення фото",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "missing_url": {
                    "summary": "Не вказано значення параметра [photo_url]",
                    "value": {
                      "message": "Не вказано значення параметра [photo_url]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "not_a_link": {
                    "summary": "Некоректне значення параметра [photo_url] - вкажіть посилання",
                    "value": {
                      "message": "Некоректне значення параметра [photo_url] - вкажіть посилання",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_photo_url": {
                    "summary": "Вказано некоректне значення параметру [photo_url]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [photo_url]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_document": {
                    "summary": "Вказано некоректне значення параметру [document_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [document_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "CDN-сховище повернуло 404 для валідного URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CdnPhotoDeleteResponseSchema"
                },
                "example": {
                  "success": false,
                  "message": "Вказано некоректне значення параметру [photo_url]"
                }
              }
            }
          },
          "500": {
            "description": "Помилка при видаленні фото.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка при видаленні фото.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/cars/brand/{car_brand_uuid}/model/{car_model_uuid}/engines/": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Список модифікацій двигунів для моделі автомобіля",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 24
            },
            "description": "Пошук за назвою модифікації двигуна",
            "required": false
          },
          {
            "name": "car_brand_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "car_model_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Список модифікацій двигунів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarEnginesResponseSchema"
                },
                "example": {
                  "car_engines": [
                    {
                      "engine_type": "Бензин",
                      "engine_volume": 2500,
                      "engine_hourses": 192,
                      "engine_power": 141,
                      "cylinders": 6
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку модифікацій двигунів для моделі автомобіля. Параметр `q` фільтрує за назвою; занадто довгий рядок дає 422 з типовим текстом хендлера. Для невідомого `car_brand_uuid` або `car_model_uuid` повертає 200 з `car_engines: []`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/car/{car_name}/models": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по моделях для марки автомобіля",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "cars_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "arr",
                "obj"
              ],
              "default": "arr"
            },
            "description": "Формат повернення авто",
            "required": false
          },
          {
            "name": "car_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Моделі для марки автомобіля",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsCarModelsResponseSchema"
                },
                "example": {
                  "models": [
                    {
                      "name": "5 (E39)",
                      "products_count": 48
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по моделях указаної марки автомобіля в поточній вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/aggregations/car/{car_name}/model/{model_name}": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Агрегація по двигунах для моделі авто",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "cars_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "arr",
                "obj"
              ],
              "default": "arr"
            },
            "description": "Формат повернення авто",
            "required": false
          },
          {
            "name": "car_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Двигуни для моделі авто",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAggregationsCarEnginesResponseSchema"
                },
                "example": {
                  "engines": [
                    {
                      "name": 2.5,
                      "products_count": 12
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Рахує кількість товарів по двигунах указаної моделі автомобіля в поточній вибірці. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference/extra/interval/{interval_uuid}": {
      "put": {
        "tags": [
          "Profile"
        ],
        "summary": "Редагувати інтервальну націнку",
        "description": "Оновити існуючий інтервал націнки за UUID.",
        "parameters": [
          {
            "name": "interval_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "integer",
                    "description": "from"
                  },
                  "value": {
                    "type": "integer",
                    "description": "value"
                  },
                  "uuid": {
                    "type": "string",
                    "description": "uuid"
                  },
                  "to": {
                    "type": "integer",
                    "nullable": true,
                    "description": "to"
                  }
                },
                "required": [
                  "from",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraSaveResponseSchema"
                },
                "example": {
                  "success": true,
                  "extra": {
                    "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                    "from": 0,
                    "to": 1000,
                    "value": 5
                  }
                }
              }
            }
          },
          "422": {
            "description": "Інтервал не знайдено або невалідне тіло",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Націнку не знайдено.",
                    "value": {
                      "message": "Націнку не знайдено.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_body": {
                    "summary": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                    "value": {
                      "message": "Некоректний формат тіла запиту. Очікується JSON-об'єкт",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_fields": {
                    "summary": "Некоректний JSON. Відсутні обов'язкові поля.",
                    "value": {
                      "message": "Некоректний JSON. Відсутні обов'язкові поля.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_range": {
                    "summary": "Вказано неправильний діапазон цін.",
                    "value": {
                      "message": "Вказано неправильний діапазон цін.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_negative": {
                    "summary": "Некоректне значення націнки.",
                    "value": {
                      "message": "Некоректне значення націнки.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера (500 без тексту при збої commit)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "summary": "Видалення інтервальної націнки",
        "description": "Видаляє інтервал націнки за UUID з preference логіна. Якщо інтервалу немає, метод повертає HTTP 200 `{success: false, message: Націнки не знайдено.}`. Збій commit — 500 без тексту (`Помилка сервера`).\n",
        "parameters": [
          {
            "name": "interval_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraDeleteResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/preference/extra/brand/{brand_name}": {
      "put": {
        "tags": [
          "Profile"
        ],
        "summary": "Редагувати націнку по бренду",
        "description": "Оновити значення націнки існуючого бренду.",
        "parameters": [
          {
            "name": "brand_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "integer",
                    "example": 3
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraSaveResponseSchema"
                },
                "example": {
                  "success": true,
                  "extra": {
                    "name": "BOSCH",
                    "value": 3
                  }
                }
              }
            }
          },
          "422": {
            "description": "Бренд не знайдено або невалідне value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Націнки не знайдено.",
                    "value": {
                      "message": "Націнки не знайдено.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_negative": {
                    "summary": "Некоректне значення націнки.",
                    "value": {
                      "message": "Некоректне значення націнки.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "extra_too_long": {
                    "summary": "Максимальна довжина націнки — 3 символи.",
                    "value": {
                      "message": "Максимальна довжина націнки — 3 символи.",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера (500 без тексту при збої commit)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "summary": "Видалення націнки по бренду",
        "description": "Видаляє націнку бренду з preference логіна. Якщо бренду немає — HTTP 200 `{success: false, message: Націнки не знайдено.}`. Збій commit — 500 без тексту (`Помилка сервера`).\n",
        "parameters": [
          {
            "name": "brand_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileExtraDeleteResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/cars/brand/{car_brand_uuid}/models/": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Список моделей для конкретної автомобільної марки",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 24
            },
            "description": "Пошук за назвою моделі автомобіля",
            "required": false
          },
          {
            "name": "car_brand_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Список моделей",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarModelsResponseSchema"
                },
                "example": {
                  "car_models": [
                    {
                      "uuid": "B3E0FD08357FFC1C57988DC6914C0E00",
                      "name": "5 (E39)",
                      "year_begin": 1995,
                      "year_end": 2004
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає сторінку моделей указаної марки автомобіля. Параметр `q` фільтрує за назвою; занадто довгий рядок дає 422 з типовим текстом хендлера. Для невідомого `car_brand_uuid` повертає 200 з `car_models: []`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/search/products/groups/{group_path}/filters": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Фільтри товарної групи",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошукова фраза. Наприклад `&q=115 906` або `&q=амортизатор передній`.\n",
            "required": false
          },
          {
            "name": "brands",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по брендах. Наприклад `&brands=SOLGY&brands=SACHS`.\n",
            "required": false
          },
          {
            "name": "badges",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dsc",
                  "exclusive",
                  "new",
                  "promo",
                  "season",
                  "top",
                  "promos",
                  "reduced_price",
                  "wholesale",
                  "discontinued"
                ]
              }
            },
            "description": "Фільтр по бейджах товару. Підтримує декілька значень: `&badges=new&badges=promo`.\n",
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Фільтр «В наявності».",
            "required": false
          },
          {
            "name": "cars",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Фільтр по автомобілях, наприклад `&cars=BMW&cars=MERCEDES-BENZ>SPRINTER 2-t`.\n",
            "required": false
          },
          {
            "name": "nodes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Фільтрація по складальному вузлу: `&nodes=Легковые автомобили/Подвеска`.\n",
            "required": false
          },
          {
            "name": "except_filter_group",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "group_path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Фільтри товарної групи",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchGroupFiltersResponseSchema"
                },
                "example": {
                  "filters": [
                    {
                      "name": "Тип",
                      "values": [
                        {
                          "value": "Оливний",
                          "products_count": 12
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Недопустиме значення параметру [badges]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Недопустиме значення параметру [badges]: unknown",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає доступні фільтри обраної товарної групи з урахуванням поточної вибірки. Невідомий `badges` дає 422",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/promo/{promo_uuid}/progress": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Прогрес акції",
        "description": "Повертає прогрес участі в акції за період, заданий періодичністю акції: весь період, місяць, поточний тиждень або сьогодні. Невалідний формат `promo_uuid` дає 422. Валідний UUID, для якого немає доступної акції, повертає 200 з `adverts: []`. Поле `target_type` — тип цілі акції: `EUR` (сума), `К-сть` (кількість) або `л` (літри).\n",
        "parameters": [
          {
            "name": "promo_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AdvertProgressSchema"
                    },
                    {
                      "$ref": "#/components/schemas/AdvertProgressListResponseSchema"
                    }
                  ]
                },
                "example": {
                  "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                  "name": "Літня акція",
                  "target_type": "EUR",
                  "is_pso": false,
                  "show_progress": true,
                  "one_time_gift": false,
                  "progress_total": 1250.5,
                  "progress_period": "За весь період акції",
                  "promo_type": "accumulation",
                  "winners_number": 0,
                  "place": null,
                  "nearest_place_in": 10.0,
                  "total": 5000.0,
                  "gifts": [
                    {
                      "percentage": 50.0,
                      "uuid": "B1C2D3E4F5A6789012345678ABCDEF01",
                      "target": 1000.0,
                      "title": "Оливний фільтр",
                      "default_image": "https://cdn.bm.parts/photos/320x320/gift.jpg",
                      "count": 1
                    }
                  ],
                  "achieved_gift": null,
                  "nearest_gift_in": 250.0,
                  "percentage": 75.5,
                  "progress": 750.5,
                  "finished": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Не вірний параметр - promo_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не вірний параметр - promo_uuid",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/download/unshipped/{warehouse_uuid}": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Excel з невідвантаженими товарами",
        "description": "Формує Excel з невідвантаженими позиціями з Redis-результату асинхронного відвантаження або з сесії. Якщо даних немає — 422 без тексту (стандартне повідомлення хендлера).\n",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "422 без тексту — немає невідвантажених товарів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{document_uuid}/not_delivered": {
      "post": {
        "tags": [
          "Complaints"
        ],
        "summary": "Створити претензію на всю реалізацію по причині \"Відсутня доставка\"",
        "description": "Створити претензію на всю реалізацію по причині \"Відсутня доставка\"",
        "parameters": [
          {
            "name": "document_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsCreateResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": false,
                  "complaint_uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                  "message": "Ваше звернення зафіксовано! Будь ласка, очікуйте на відповідь.",
                  "photo_required": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Не можна створити претензію «Відсутня доставка»",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_id": {
                    "summary": "Некоректний формат ID",
                    "value": {
                      "message": "Некоректний формат ID",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "already_complaint": {
                    "summary": "Уже є претензія",
                    "value": {
                      "message": "Не можна створити претензію з причиною Відсутня доставка по реалізації, на яку вже створено претензію",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "already_return": {
                    "summary": "Уже є повернення",
                    "value": {
                      "message": "Не можна створити претензію з причиною Відсутня доставка по реалізації, на яку вже створено повернення",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "already_reclamation": {
                    "summary": "Уже є рекламація",
                    "value": {
                      "message": "Не можна створити претензію з причиною Відсутня доставка по реалізації, на яку вже створено рекламацію",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "not_delivered": {
                    "summary": "Реалізація не доставлена",
                    "value": {
                      "message": "Не можна створити претензію до видаткової накладної, за якою товари ще не доставлено",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/attachments": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Файли прикріплені до претензії",
        "description": "Повертає список файлів прикріплених до претензії.",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsAttachmentsResponseSchema"
                },
                "example": {
                  "attachments": [
                    {
                      "id": "1-1",
                      "name": "photo.jpg",
                      "url": "https://api.bm.parts/complaints/issue/uuid/attachment"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/attachment/{attach_id}/{attach_name}": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Контент файлу прикріпленого до задачі",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "attach_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attach_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Вміст файлу",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Контент файлу прикріпленого до задачі",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/attachment": {
      "post": {
        "tags": [
          "Complaints"
        ],
        "summary": "Прикріпити файл до претензії",
        "description": "Можливо прикріпити тільки файл типу зображення!\n\nМетод повертає статус 201 CREATED при успішному надсиланні файлу\nта повертає список всіх файлів до претензії.",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "attachment"
                ],
                "properties": {
                  "attachment": {
                    "type": "array",
                    "description": "Необхідно передати файл",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsAttachmentsResponseSchema"
                },
                "example": {
                  "attachments": [
                    {
                      "id": "1-1",
                      "name": "photo.jpg",
                      "url": "https://api.bm.parts/complaints/issue/uuid/attachment"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/edit_data": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Отримати дані для редагування претензії",
        "description": "Отримати дані для редагування претензії",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsEditDataResponseSchema"
                },
                "example": {
                  "uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                  "title": "Претензія до РН-000123",
                  "products": [
                    {
                      "product": {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "article": "OC47",
                        "name": "Оливний фільтр",
                        "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                        "brand": {
                          "uuid": "81F4005056AC66D611EAD7173350C7AA",
                          "name": "BOSCH"
                        }
                      },
                      "sold_quantity": 2,
                      "available": 1,
                      "quantity": 1,
                      "reason": {
                        "name": "Брак",
                        "uuid": "81F4005056AC66D611EAD7173350C7AA"
                      },
                      "is_missing": false
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/comments": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Список повідомлень до претензії",
        "description": "Повертає коментарі YouTrack-задачі претензії. Невалідний UUID — 422. Претензії немає — `first_or_404` або 404 з `{message, success: false, documentation_url}`. Порожній YouTrack URL — 500.\n",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsCommentsResponseSchema"
                },
                "example": {
                  "comments": [
                    {
                      "id": "1-1",
                      "issue_id": "CLAIMS-127",
                      "author": "ТОВ Автосвіт",
                      "text": "Дякую за відповідь",
                      "created_at": "2024-03-15T10:30:00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "first_or_404 — обробник 404 завжди `Ресурс не знайдено`. 404 повертає власне тіло.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "flask_404": {
                    "summary": "first_or_404 / 404",
                    "value": {
                      "message": "Ресурс не знайдено",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "pretension_not_found": {
                    "summary": "Претензії не знайдено.",
                    "value": {
                      "message": "Претензії не знайдено.",
                      "documentation_url": "https://developer.bm.parts/",
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невірний формат UUID претензії",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Некоректний формат ID",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Діалог недоступний",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Діалог недоступний, зверніться, будь ласка, до служби підтримки.",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/order/{order_uuid}/product/{product_uuid}/{quantity}": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Зменшити кількість товару в замовленні",
        "description": "Змінює кількість товару в замовленні через 1С. Невалідний order_uuid, product_uuid або quantity дають 422 з текстами нижче.\n",
        "parameters": [
          {
            "name": "order_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingEditOrderResponseSchema"
                },
                "example": {
                  "result": true,
                  "message": null,
                  "order": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ЗК000123",
                    "date": "2026-08-14T12:00:00Z",
                    "delivery_date": "2026-08-15T12:00:00Z",
                    "route_date": "2026-08-15T08:00:00Z",
                    "shipping_date": "2026-08-14T16:00:00Z",
                    "status": "В обробці",
                    "comment": "",
                    "total": 951.42,
                    "currency": "UAH",
                    "warehouse": null,
                    "owner": null,
                    "products": [],
                    "delivery_config": null,
                    "route_code": "R001",
                    "key": "KEY123",
                    "processed": false
                  },
                  "order_canceled": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри коригування замовлення",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_order": {
                    "summary": "Вказано некоректне значення параметру [order_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_product": {
                    "summary": "Вказано некоректне значення параметра [product_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [product_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_quantity": {
                    "summary": "Вказано некоректне значення параметра [quantity]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [quantity]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/order/{order_uuid}/product/{product_uuid}": {
      "delete": {
        "tags": [
          "Processing"
        ],
        "summary": "Видалити товар із замовлення",
        "description": "Зменшує кількість товару в замовленні до нуля через edit_order. Невалідний order_uuid, product_uuid або quantity дають 422 з текстами нижче.\n",
        "parameters": [
          {
            "name": "order_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingEditOrderResponseSchema"
                },
                "example": {
                  "result": true,
                  "message": null,
                  "order": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ЗК000123",
                    "date": "2026-08-14T12:00:00Z",
                    "delivery_date": "2026-08-15T12:00:00Z",
                    "route_date": "2026-08-15T08:00:00Z",
                    "shipping_date": "2026-08-14T16:00:00Z",
                    "status": "В обробці",
                    "comment": "",
                    "total": 951.42,
                    "currency": "UAH",
                    "warehouse": null,
                    "owner": null,
                    "products": [],
                    "delivery_config": null,
                    "route_code": "R001",
                    "key": "KEY123",
                    "processed": false
                  },
                  "order_canceled": false
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри коригування замовлення",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_order": {
                    "summary": "Вказано некоректне значення параметру [order_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [order_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_product": {
                    "summary": "Вказано некоректне значення параметра [product_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [product_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_quantity": {
                    "summary": "Вказано некоректне значення параметра [quantity]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [quantity]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}/comment": {
      "post": {
        "tags": [
          "Complaints"
        ],
        "summary": "Додати повідомлення до претензії",
        "description": "Додає коментар до YouTrack-задачі претензії. Невалідний UUID — 422. Порожній comment — FormValidationError. Ті самі 404/500, що у GET comments. Успіх — 201.\n",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "comment"
                ],
                "properties": {
                  "comment": {
                    "type": "string",
                    "description": "Необхідно вказати коментар"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsCommentsResponseSchema"
                },
                "example": {
                  "comments": [
                    {
                      "id": "1-1",
                      "author": "ТОВ Автосвіт",
                      "text": "Дякую за відповідь"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/cart/{cart_uuid}/pre_check": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження кошика",
        "description": "Перевіряє можливість відвантаження кошика. Невалідний або неіснуючий cart_uuid дає 422, а не 404. Порожній кошик повертає 200 з allowed=false. general_pre_check може дати 422 для client_uuid або сплячих ФОП.\n",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідний кошик або параметри pre_check",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_cart": {
                    "summary": "Вказано некоректне значення cart_uuid",
                    "value": {
                      "message": "Вказано некоректне значення cart_uuid",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "sleeping_fop": {
                    "summary": "Відвантаження недоступне для неактивних ФОП",
                    "value": {
                      "message": "Відвантаження недоступне для неактивних ФОП",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження кошика",
        "description": "Перевіряє можливість відвантаження кошика. Невалідний або неіснуючий cart_uuid дає 422, а не 404. Порожній кошик повертає 200 з allowed=false. general_pre_check може дати 422 для client_uuid або сплячих ФОП.\n",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідний кошик або параметри pre_check",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_cart": {
                    "summary": "Вказано некоректне значення cart_uuid",
                    "value": {
                      "message": "Вказано некоректне значення cart_uuid",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_client": {
                    "summary": "Вказано некоректне значення параметра [client_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [client_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "sleeping_fop": {
                    "summary": "Відвантаження недоступне для неактивних ФОП",
                    "value": {
                      "message": "Відвантаження недоступне для неактивних ФОП",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/edo_sign/success/{type_}/{uuid}/{signature}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Змінити статус документу на \"підписаний\" після успішного підписання",
        "description": "Callback після успішного підпису у iframe Вчасно. Невалідний HMAC дає 422 без тексту. Далі викликає 1С і показує HTML «Документ успішно підписано!».\n",
        "parameters": [
          {
            "name": "type_",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "signature",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML-сторінка: документ підписано",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/documents/edo_sign/cancel/{type_}/{uuid}/{signature}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Неуспішне підписання документу",
        "description": "Callback після скасування підпису у iframe Вчасно. Перевіряє HMAC signature; невалідний підпис дає 422 без тексту (стандартне повідомлення хендлера). Успіх — HTML-сторінка «Документ відхилено!».\n",
        "parameters": [
          {
            "name": "type_",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "signature",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML-сторінка: документ відхилено",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту без тексту — невалідний HMAC підпису callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/shopping/wishlist/product/{uuid}": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Додати товар до списку обраних",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessMessageResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Товар успішно додано до списку бажань."
                }
              }
            }
          },
          "409": {
            "description": "Товар уже в списку обраних",
            "content": {
              "application/json": {
                "example": {
                  "message": "Цей товар уже додано до списку бажань.",
                  "success": false,
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Додати товар до списку обраних",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/region/{region_uuid}/cities": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Список міст області",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "region_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCitiesResponseSchema"
                },
                "example": {
                  "cities": [
                    {
                      "uuid": "CT000000000000000000000000000001",
                      "name": "Київ"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Список міст області",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/cart/{cart_uuid}/products": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Пакетне додавання товарів до кошика",
        "description": "Додає масив products до кошика. Порожній products — 422 з success=false. AddProductsToCart також 422 з error_rows. Некоректний cart_uuid дає 422.\n",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "products"
                ],
                "properties": {
                  "products": {
                    "type": "array",
                    "description": "Масив товарів для додавання",
                    "items": {
                      "type": "object",
                      "required": [
                        "uuid",
                        "qnt"
                      ],
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "description": "UUID товару"
                        },
                        "qnt": {
                          "type": "number",
                          "description": "Кількість"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "products": [
                  {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "qnt": 2
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingBatchAddProductsResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  },
                  "success": true,
                  "error_rows": []
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту обходить хендлер (success=false)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не передано параметр [products]",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/cart/{cart_uuid}/product/{product_uuid}/{quantity}": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Додати або оновити кількість товару в кошику",
        "description": "POST встановлює кількість товару на передане значення. Якщо потрібно додати кількість до вже наявної в кошику — використовуйте PUT.\n",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingAddProductResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  },
                  "previous_quantity": 0,
                  "position_quantity": 2,
                  "position_total": 651.0,
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Додати або оновити кількість товару в кошику",
        "description": "PUT додає передану кількість до вже наявної в кошику. Щоб встановити точне значення кількості — використовуйте POST.\n",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingAddProductResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  },
                  "previous_quantity": 0,
                  "position_quantity": 2,
                  "position_total": 651.0,
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/cart/{cart_uuid}/product/{product_uuid}": {
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити товар з кошика",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingDeleteProductResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Видалити товар з кошика",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/download/reconciliation/{file_type}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Зберегти звірку взаєморозрахунків як файл",
        "description": "Завантажує Excel/PDF звірки за період.\n",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          },
          {
            "name": "file_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "xlsx",
                "pdf",
                "xls"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл звіту",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/reports/download/payment_report/{file_type}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Завантажити звіт по оплатах у вигляді файлу",
        "description": "Віддає файл звіту. `file_type` у path — `xlsx` або `xls`.\n",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "month"
            },
            "description": "Період фільтрації",
            "required": false
          },
          {
            "name": "file_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл звіту (application/vnd.ms-excel)",
            "content": {
              "application/vnd.ms-excel": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Дочірній логін не має доступу до звітів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не авторизовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/settings/{app_name}/update": {
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Оновити налаштування додатку за ключем",
        "description": "Частково оновити ключі налаштувань існуючого запису додатку.",
        "parameters": [
          {
            "name": "app_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Довільні ключі налаштувань, що будуть оновлені",
                "additionalProperties": true,
                "properties": {
                  "client_uuid": {
                    "type": "string",
                    "description": "UUID пов'язаного контрагента"
                  },
                  "cart_uuid": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettingsUpdateResponseSchema"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "version": "0.0.1"
                  },
                  "settings": {
                    "cart_uuid": null
                  }
                }
              }
            }
          },
          "404": {
            "description": "Налаштувань із заданими параметрами немає. 404 ігнорується обробником 404 — у тілі завжди `Ресурс не знайдено`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Некоректний client_uuid холдингу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/nodes/path": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Дерево автомобільних вузлів за шляхом",
        "responses": {
          "200": {
            "description": "Вузли за шляхом",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogNodesPathResponseSchema"
                },
                "example": {
                  "nodes": [
                    {
                      "path": "Двигун/Фільтри",
                      "name": "Фільтри",
                      "products_count": 240
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає вузли каталогу наступного рівня за шляхом `parent_path` (порожній шлях — корінь дерева).",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}/attachments": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Файли, прикріплені до скарги",
        "description": "Повертає файли, прикріплені до звернення. Невалідний UUID 1С — 422 без тексту (`Помилка перевірки параметрів запиту`).\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsAttachmentsResponseSchema"
                },
                "example": {
                  "attachments": [
                    {
                      "id": "529bc2f8-0ee0-df11-971b-001d60e938c6",
                      "name": "photo.jpg",
                      "url": "https://api.bm.parts/claims/issue/id/attachment/1/photo.jpg"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}/attachment/{attach_id}/{attach_name}": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Вміст файлу, прикріпленого до задачі",
        "description": "Віддає байти вкладення Creatio. Невалідний UUID 1С звернення — 422 без тексту (`Помилка перевірки параметрів запиту`).\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attach_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attach_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Вміст файлу",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}/attachment": {
      "post": {
        "tags": [
          "Claims"
        ],
        "summary": "Прикріпити файл до звернення",
        "description": "Прикріплює файл до звернення. Невалідний UUID 1С — 422 без тексту. Відсутній файл — HTTP 422 `{success: false, message: Необхідно передати файл.}`. Закрите звернення (крім типу BM site) — 422. Невдала валідація форми — 422 `{ok: false, errors}`.\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachment": {
                    "type": "array",
                    "description": "Необхідно передати файл",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                },
                "required": [
                  "attachment"
                ]
              }
            }
          }
        },
        "responses": {
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID, відсутній файл, закрите звернення або невалідний тип",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "без тексту",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_file": {
                    "summary": "Некоректні дані форми",
                    "value": {
                      "message": "Необхідно передати файл.",
                      "documentation_url": "https://developer.bm.parts/",
                      "success": false
                    }
                  },
                  "closed_issue": {
                    "summary": "Ви не можете прикріпити файл у закрите звернення",
                    "value": {
                      "message": "Ви не можете прикріпити файл у закрите звернення",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsAttachFileResponseSchema"
                },
                "example": {
                  "id": "529bc2f8-0ee0-df11-971b-001d60e938c6",
                  "name": "photo.jpg"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}/comments": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Список коментарів до скарги",
        "description": "Повертає коментарі звернення, відсортовані за датою оновлення. Невалідний UUID 1С — 422 без тексту (`Помилка перевірки параметрів запиту`).\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsCommentsResponseSchema"
                },
                "example": {
                  "comments": [
                    {
                      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "issue_id": "09a8395d-9d8d-4651-8b82-0670a151dd0d",
                      "author": "ТОВ Автосвіт",
                      "text": "Дякую за відповідь",
                      "is_client": true,
                      "created_at": "2024-03-15T10:30:00"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}/comment": {
      "post": {
        "tags": [
          "Claims"
        ],
        "summary": "Додати коментар до задачі",
        "description": "Додає коментар до звернення. Невалідний UUID 1С — 422 без тексту (`Помилка перевірки параметрів запиту`). Звернення немає — 404 без тексту (`Ресурс не знайдено`). Закрите звернення — 422. Порожній comment — FormValidationError. Успіх — 201.\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string",
                    "description": "Необхідно вказати коментар"
                  }
                },
                "required": [
                  "comment"
                ]
              }
            }
          }
        },
        "responses": {
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID, закрите звернення або порожній коментар",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "без тексту",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "closed_issue": {
                    "summary": "Ви не можете коментувати закрите звернення",
                    "value": {
                      "message": "Ви не можете коментувати закрите звернення",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_comment": {
                    "summary": "FormValidationError",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "comment": [
                          "Необходимо указать комментарий"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsSuccessResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/reclamation/{reclamation_uuid}": {
      "put": {
        "tags": [
          "Return Products"
        ],
        "summary": "Редагувати Акт рекламації",
        "description": "Редагувати Акт рекламації",
        "parameters": [
          {
            "name": "reclamation_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_draft": {
                    "type": "boolean"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Вкажіть коректне посилання"
                    }
                  },
                  "car_brand": {
                    "type": "string"
                  },
                  "car_model": {
                    "type": "string"
                  },
                  "car_number": {
                    "type": "string"
                  },
                  "car_code": {
                    "type": "string"
                  },
                  "car_engine": {
                    "type": "string"
                  },
                  "prod_year": {
                    "type": "string"
                  },
                  "installation_at": {
                    "type": "string"
                  },
                  "disassembling_at": {
                    "type": "string"
                  },
                  "odometer_start": {
                    "type": "integer"
                  },
                  "odometer_end": {
                    "type": "integer"
                  },
                  "defect_description": {
                    "type": "string"
                  },
                  "defect_cause": {
                    "type": "string"
                  },
                  "diagnostic_equipment": {
                    "type": "string"
                  },
                  "defect_detection_case": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "integer"
                  },
                  "product_uuid": {
                    "type": "string",
                    "description": "Некоректний формат UUID"
                  },
                  "partner_name": {
                    "type": "string"
                  },
                  "partner_address": {
                    "type": "string"
                  },
                  "partner_phone": {
                    "type": "string"
                  },
                  "sales_doc_uuid": {
                    "type": "string",
                    "description": "Некоректний формат UUID"
                  },
                  "partner_unit": {
                    "type": "string"
                  }
                },
                "required": [
                  "defect_description",
                  "product_uuid",
                  "quantity",
                  "sales_doc_uuid"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsEditReclamationResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Документ «Акт рекламації» успішно оновлено"
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [reclamation_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [reclamation_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Акт рекламації по uuid",
        "description": "Підтримує два формати ідентифікатора:\n\n1. UUID створеної рекламації\n- Формат: 98A985DA1537AFA348DF43ECCDBD3C2E\n- Використовується для отримання документа з бази даних.\n\n2. UUID чернетки рекламації\n- Формат: <DOCUMENT_UUID>_<PRODUCT_UUID>\n- Приклад: <DOCUMENT_UUID>_<PRODUCT_UUID>\n- Це складений ключ із UUID документа та UUID товару. Використовується для отримання чернетки з Redis.\nДля чернетки поля `product_uuid` та `sales_doc_uuid` присутні, коли `is_draft=true`. Поле `photo_or_video` застаріле. Поле `sales_doc.owner.number` залишено для сумісності; використовуйте `sales_doc.owner.code`.",
        "parameters": [
          {
            "name": "reclamation_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ReturnProductsPublicReclamationSchema"
                    },
                    {
                      "$ref": "#/components/schemas/ReclamationDraftFormSchema"
                    }
                  ]
                },
                "example": {
                  "uuid": "RA000000000000000000000000000001",
                  "number": "РК000123",
                  "quantity": 1,
                  "product": {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "article": "OC47",
                    "name": "Оливний фільтр"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Чернетку не знайдено в Redis. 404 завжди віддає стандартне тіло.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [reclamation_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Return Products"
        ],
        "summary": "Видалити Акт рекламації або чернетку",
        "description": "Підтримує два формати ідентифікатора:\n\n1. UUID створеної рекламації\n- Формат: 98A985DA1537AFA348DF43ECCDBD3C2E\n- Використовується для видалення документа з бази даних.\n\n2. UUID чернетки рекламації\n- Формат: <DOCUMENT_UUID>_<PRODUCT_UUID>\n- Приклад: <DOCUMENT_UUID>_<PRODUCT_UUID>\n- Це складений ключ із UUID документа та UUID товару. Використовується для видалення чернетки з Redis.",
        "parameters": [
          {
            "name": "reclamation_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsDeleteReclamationResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Документ «Заявка на рекламацію» успішно видалено"
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [reclamation_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [reclamation_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/returns/{uuid}/{quantity}": {
      "put": {
        "tags": [
          "Return Products"
        ],
        "summary": "Зміна кількості товару зі списку повернень",
        "description": "Змінює кількість позиції у списку повернень. `quantity=0` видаляє позицію. Невалідний uuid або quantity дають 422 з текстами нижче; відсутня позиція повертає 200 з `success=false`. Хелпер також може дати «Некоректне значення id товару чи документу» або «Недоступна кількість для параметра [quantity]».\n",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsUpdateQuantityResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Кількість успішно змінено"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні uuid або quantity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "Вказано некоректне значення параметра [uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_quantity": {
                    "summary": "Вказано некоректне значення параметра [quantity]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [quantity]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/returns/{file_type}": {
      "get": {
        "tags": [
          "Return Products"
        ],
        "summary": "Завантажити excel-документ з товарами на повернення",
        "parameters": [
          {
            "name": "file_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "Вказано некоректне значення параметра [file_type]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [file_type]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Завантажити excel-документ з товарами на повернення",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/return_products/returns/{uuid}": {
      "delete": {
        "tags": [
          "Return Products"
        ],
        "summary": "Видалити товар із товарів до повернення",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnProductsDeleteResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Видалити товар із товарів до повернення",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/promo/{promo_uuid}": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати акцію",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "show_all",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "promo_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvertDetailResponseSchema"
                },
                "example": {
                  "adverts": {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "name": "Літня акція",
                    "description": "Опис акції",
                    "begin_at": "2026-06-01T00:00:00Z",
                    "end_at": "2026-08-31T00:00:00Z",
                    "date_to_analyze_from": "2026-06-01T00:00:00Z",
                    "banners": {
                      "home": {
                        "banner_code": "home",
                        "banner_url": "https://cdn.bm.parts/promo/home.jpg",
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99"
                      }
                    },
                    "show_progress": true,
                    "periodicity": 0,
                    "finished": false,
                    "target_type": "EUR",
                    "one_time_gift": false,
                    "is_member": true,
                    "has_children": false,
                    "children": null,
                    "children_count": 0,
                    "count_of_active_promos": 0,
                    "progress_total": 1250.5,
                    "is_registered": false,
                    "is_pso": false
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID акції",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Акцію з указаним UUID не знайдено. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає деталі рекламної акції за UUID, включно з дочірніми акціями, прогресом і статусом участі. Невалідний UUID дає 422 з типовим текстом хендлера. Якщо акції немає — 404.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/{pso_uuid}/registration": {
      "post": {
        "tags": [
          "Advertising"
        ],
        "summary": "Реєстрація на ІТП із вибором цілі і подарунку",
        "description": "Реєструє контрагента на індивідуальну торгову пропозицію (ІТП) з обраною ціллю та подарунком.\nПовертає 404, якщо ІТП не існує, недоступна для контрагента або вийшов термін реєстрації. Дочірній логін без прав менеджера отримує 403. Невалідні target / gift_uuid — 422\n",
        "parameters": [
          {
            "name": "pso_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "gift_uuid",
                  "target"
                ],
                "properties": {
                  "gift_uuid": {
                    "type": "string",
                    "description": "UUID подарунка"
                  },
                  "target": {
                    "type": "number",
                    "description": "Значення цілі"
                  }
                }
              },
              "example": {
                "gift_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                "target": 5000
              }
            }
          }
        },
        "responses": {
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідні параметри реєстрації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "empty_body": {
                    "summary": "Порожнє тіло запиту",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_target": {
                    "summary": "Вказано некоректний target",
                    "value": {
                      "message": "Вказано некоректний target",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_gift": {
                    "summary": "Вказано некоректний gift_uuid",
                    "value": {
                      "message": "Вказано некоректний gift_uuid",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PsoRegistrationResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Ціль і подарунок успішно обрано"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/{pso_uuid}/custom_plan/{target_value}": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати деталі для створення індивідуальної цілі",
        "parameters": [
          {
            "name": "pso_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "target_value",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PsoCustomTargetResponseSchema"
                },
                "example": {
                  "custom_target": {
                    "target_type": "EUR",
                    "target": 5500.0,
                    "is_selected": false,
                    "is_custom": true,
                    "min_target": 5200.0,
                    "step": 100,
                    "gift_card_value": 500,
                    "gifts": [
                      {
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "default_image": "https://cdn.bm.parts/photos/gift.jpg",
                        "name": "Сертифікат",
                        "article": "GIFT100",
                        "is_selected": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "ІТП не знайдено, недоступна або вийшов термін реєстрації. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідне значення цілі",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "below_min": {
                    "summary": "Вказана ціль не може бути меншою за мінімальний поріг",
                    "value": {
                      "message": "Вказана ціль не може бути меншою за мінімальний поріг",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_format": {
                    "summary": "Некоректний формат [target_value]",
                    "value": {
                      "message": "Некоректний формат [target_value]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_rate": {
                    "summary": "Відсутній курс",
                    "value": {
                      "message": "Відсутній курс",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Рахує індивідуальну ціль ІТП для `target_value` (або `default`) і повертає крок, мінімум і сертифікат. Повертає 404, якщо ІТП не існує, недоступна або вийшов термін реєстрації.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/{pso_uuid}/unsubscribe": {
      "post": {
        "tags": [
          "Advertising"
        ],
        "summary": "Відписка від участі в ІТП",
        "description": "Знімає реєстрацію контрагента з індивідуальної торгової пропозиції (ІТП) — видаляє обрані ціль і подарунок.\nПовертає 404, якщо ІТП не існує, недоступна для цього контрагента, вийшов термін реєстрації, контрагент не був зареєстрований, або запит іде з дочірнього логіна без прав менеджера.\n",
        "parameters": [
          {
            "name": "pso_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PsoUnsubscribeResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Ви скасували участь в акції"
                }
              }
            }
          },
          "404": {
            "description": "ІТП не знайдено, недоступна, вийшов термін реєстрації, контрагент не зареєстрований або дочірній логін без прав. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/advertising/{pso_uuid}/plans": {
      "get": {
        "tags": [
          "Advertising"
        ],
        "summary": "Отримати список цілей і призів по вказаному ІТП",
        "parameters": [
          {
            "name": "pso_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PsoPlansResponseSchema"
                },
                "example": {
                  "targets": [
                    {
                      "target_type": "EUR",
                      "target": 5000.0,
                      "is_selected": false,
                      "is_custom": false,
                      "gifts": [
                        {
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                          "default_image": "https://cdn.bm.parts/photos/gift.jpg",
                          "name": "Сертифікат",
                          "article": "GIFT100",
                          "is_selected": false
                        }
                      ]
                    }
                  ],
                  "can_create_target": true
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "UUID некоректний, ІТП не існує або вийшов термін реєстрації. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає список цілей і подарунків індивідуальної торгової пропозиції (ІТП). Повертає 404, якщо UUID некоректний, ІТП не існує або вийшов термін реєстрації.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/shipment/{task_id}": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірка результатів асинхронного відвантаження",
        "description": "Перевірка результатів асинхронного відвантаження",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingShipmentTaskResponseSchema"
                },
                "example": {
                  "state": "SUCCESS",
                  "result": {
                    "result": true,
                    "error": null,
                    "document": {
                      "uuid": "8191005056BA39E811EBC9F072221C0D",
                      "number": "ПП001325988",
                      "date": "2026-08-14T16:33:32Z",
                      "sum": 951.42,
                      "currency": "ГРН",
                      "type": "000000CC",
                      "url": "https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{document_uuid}": {
      "post": {
        "tags": [
          "Complaints"
        ],
        "summary": "Створити претензію",
        "description": "Створити претензію",
        "parameters": [
          {
            "name": "document_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComplaintsRequestSchema"
              },
              "example": {
                "products": [
                  {
                    "product_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "quantity": 1,
                    "cause_uuid": "81F4005056AC66D611EAD7173350C7AA"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsCreateResponseSchema"
                },
                "example": {
                  "result": true,
                  "error": false,
                  "data": [
                    {
                      "product_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "quantity": 1,
                      "cause_uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "result": true,
                      "errors": null
                    }
                  ],
                  "complaint_uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                  "message": "Ваше звернення зафіксовано! Будь ласка, очікуйте на відповідь.",
                  "photo_required": false
                }
              }
            }
          },
          "422": {
            "description": "Невалідний документ або товари претензії",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsValidationResponseSchema"
                },
                "examples": {
                  "invalid_id": {
                    "summary": "Некоректний формат ID",
                    "value": {
                      "success": false,
                      "message": "Некоректний формат ID"
                    }
                  },
                  "too_old": {
                    "summary": "Документ старший за 5 днів",
                    "value": {
                      "success": false,
                      "message": "Документ недоступний для створення претензій. Претензії можна створювати протягом 5 днів з моменту створення реалізації."
                    }
                  },
                  "not_shipped": {
                    "summary": "Товари за цією видатковою накладною ще не доставлено.",
                    "value": {
                      "success": false,
                      "message": "Товари за цією видатковою накладною ще не доставлено."
                    }
                  },
                  "already_not_delivered": {
                    "summary": "Вже є претензія «Відсутня доставка»",
                    "value": {
                      "success": false,
                      "message": "Не можна створити претензію по реалізації, на яку вже створено претензію з причиною \"Відсутня доставка\""
                    }
                  },
                  "form_errors": {
                    "summary": "Помилка валідації",
                    "value": {
                      "success": false,
                      "message": "Помилка валідації"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/issue/{complaint_uuid}": {
      "put": {
        "tags": [
          "Complaints"
        ],
        "summary": "Редагування претензії",
        "description": "Редагування претензії",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComplaintsRequestSchema"
              },
              "example": {
                "products": [
                  {
                    "product_uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "quantity": 1,
                    "cause_uuid": "81F4005056AC66D611EAD7173350C7AA"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsMessageResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Претензію успішно змінено"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsValidationResponseSchema"
                },
                "example": {
                  "success": false,
                  "message": "Вкажіть правильну структуру даних"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Complaints"
        ],
        "summary": "Скасування претензії",
        "description": "Скасування претензії",
        "parameters": [
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsMessageResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Претензію успішно скасовано"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/{document_uuid}/products": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Список товарів, доступних для створення претензії по реалізації",
        "description": "Повертає товари реалізації, по яких ще можна створити претензію. Пошук `q` — за артикулом, назвою товару або назвою бренду. Невалідний UUID документа — 422. Документ старший за 5 днів, ще не доставлений, або вже є претензія «Відсутня доставка» — відповідні тексти 422. Відсутній статус ТТН — 422. Пагінація — `paging_wrapper`.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "document_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsProductsResponseSchema"
                },
                "example": {
                  "products": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "article": "OC47",
                      "name": "Оливний фільтр",
                      "quantity": 2,
                      "default_image": null,
                      "brand": {
                        "uuid": "812C000C2999A7E611E55EB9C240D5C6",
                        "name": "BOSCH"
                      }
                    }
                  ],
                  "not_delivered_status_access": false
                }
              }
            }
          },
          "504": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Час очікування відповіді від зовнішнього сервісу вичерпано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Документ не знайдено. first_or_404 — обробник завжди `Ресурс не знайдено`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний документ, пагінація або статус ТТН",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_id": {
                    "summary": "Некоректний формат ID",
                    "value": {
                      "message": "Некоректний формат ID",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_ttn_status": {
                    "summary": "Відсутній статус ТТН",
                    "value": {
                      "message": "Відсутній статус ТТН",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "per_page_max": {
                    "summary": "per_page значення перевищує максимальне (100)",
                    "value": {
                      "message": "per_page значення перевищує максимальне (100)",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/processing/{product_uuid}/{quantity}/pre_check": {
      "get": {
        "tags": [
          "Processing"
        ],
        "deprecated": true,
        "summary": "Перевірити доступність відвантаження товару",
        "description": "Застарілий з 28.01.2024. Рахує суму позиції product_uuid × quantity і викликає ShipmentCheck. Невалідний UUID або quantity ≤ 0 дає 422 з текстами нижче. general_pre_check може додати 422 для client_uuid / сплячих ФОП.\n",
        "parameters": [
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingPreCheckResponseSchema"
                },
                "example": {
                  "allowed": true,
                  "error": false,
                  "message": "Відвантаження дозволено."
                }
              }
            }
          },
          "422": {
            "description": "Невалідні product_uuid, quantity або client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_product": {
                    "summary": "Вказано некоректне значення параметра [product_uuid]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [product_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_quantity": {
                    "summary": "Вказано некоректне значення параметра [quantity]",
                    "value": {
                      "message": "Вказано некоректне значення параметра [quantity]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "sleeping_fop": {
                    "summary": "Відвантаження недоступне для неактивних ФОП",
                    "value": {
                      "message": "Відвантаження недоступне для неактивних ФОП",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/download_invoice/{uuid}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Зберегти рахунок на оплату",
        "description": "Завантажує PDF рахунку на оплату (реалізація) з 1С. Якщо документ не знайдено або він не належить холдингу, get_owner_code робить 404 зі стандартним тілом. Помилка SOAP — 422 з текстом 1С або «Не вдалось отримати документ».\n",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Документ не знайдено або недоступний контрагенту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка 1С або документ недоступний",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не вдалось отримати документ",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/sales_by_order/{uuid}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Отримати реалізації товарів за замовленням покупця",
        "description": "Повертає реалізації, пов'язані із замовленням покупця. Невалідний uuid дає 422. Якщо замовлення не знайдено серед документів холдингу, повертається 404 з повідомленням «Не вдалося знайти замовлення».\n",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsSalesByOrderResponseSchema"
                },
                "example": {
                  "order": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "ЗК000123",
                    "status": "Відвантажено",
                    "processed": true
                  },
                  "sales": [
                    {
                      "uuid": "B191005056BA39E811EBC9F072221C0E",
                      "number": "РН001234"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Замовлення не знайдено серед документів холдингу.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не вдалося знайти замовлення",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Не вірно заданий параметр [uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/reclamation/{act_uuid}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Стан рекламації",
        "description": "Повертає з 1С позиції акту рекламації. Невалідний act_uuid дає 422 без тексту (стандартне повідомлення хендлера). Якщо акт не знайдено, get_owner_code робить 404 зі стандартним тілом.\n",
        "parameters": [
          {
            "name": "act_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsReclamationProductsResponseSchema"
                },
                "example": {
                  "reclamation_products": {
                    "result": true,
                    "error": null,
                    "data": [
                      {
                        "status": "Прийнято",
                        "count": 1,
                        "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                        "code": "000027828",
                        "article": "OC47",
                        "brand_name": "BOSCH",
                        "name": "Оливний фільтр"
                      }
                    ]
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту без тексту — невалідний act_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Акт не знайдено або недоступний контрагенту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/download/{type_}/{uuid}/{file_type}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Зберегти документ",
        "description": "Завантажує PDF/XLSX/CSV документа з 1С. file_type поза pdf, xlsx, csv дає 422 без тексту (стандартне повідомлення хендлера). Помилка SOAP — 422 з текстом 1С або «Не вдалось отримати документ». Невідомий тип або відсутній метод завантаження — 404 зі стандартним тілом.\n",
        "parameters": [
          {
            "name": "type_",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Тип документа без методу завантаження або KeyError/IndexError при формуванні файлу. 404 завжди віддає стандартне тіло.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний file_type або помилка отримання файлу з 1С",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_file_type": {
                    "summary": "без тексту (file_type не pdf/xlsx/csv)",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "soap_error": {
                    "summary": "Помилка 1С або документ недоступний",
                    "value": {
                      "message": "Не вдалось отримати документ",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Файл для завантаження",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/trainings/{training_uuid}/participant/{key}": {
      "delete": {
        "tags": [
          "Trainings"
        ],
        "summary": "Видалити учасника з тренінгу по ключу",
        "parameters": [
          {
            "name": "training_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingActionResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Реєстрацію успішно скасовано"
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/{uuid}/check_sign": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Отримати статус підписання документу",
        "description": "Повертає edo_signed для документа за UUID (true/false/null, якщо запису ЕДО немає).\n",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsCheckSignResponseSchema"
                },
                "example": {
                  "edo_signed": true
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/trainings/{training_uuid}/iCalendar": {
      "get": {
        "tags": [
          "Trainings"
        ],
        "summary": "Отримати об'єкт для додавання в календар",
        "description": "Отримати об'єкт для додавання в календар",
        "parameters": [
          {
            "name": "training_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "200": {
            "description": "Файл календаря (text/calendar)",
            "content": {
              "text/calendar": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/{type_}/{uuid}/vchasno": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Створити сесію підписання документа в ЕДО \"Вчасно\"",
        "description": "Створює сесію підпису у Вчасно і повертає URL. Маршрут `/sign` застарілий, користуйтесь `/vchasno`. Власне тіло відповіді: відсутній ЕДО-документ дає 404 з текстом «Документ не знайдено» і success=false, а не «Ресурс не знайдено».\n",
        "parameters": [
          {
            "name": "type_",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsSignResponseSchema"
                },
                "example": {
                  "vchasno_url": "https://vchasno.ua/sign/abc123"
                }
              }
            }
          },
          "404": {
            "description": "обходить хендлер",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Документ не знайдено",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "422": {
            "description": "Помилка підпису документа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ви не можете підписати цей документ",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Invalid Vchasno response",
                  "documentation_url": "https://developer.bm.parts/",
                  "success": false
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/wishlist_to_cart/{cart_uuid}": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Додати усі товари зі списку бажань в кошик",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingBatchAddProductsResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  },
                  "success": true,
                  "error_rows": []
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Додати усі товари зі списку бажань в кошик",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/receiver/{receiver_uuid}": {
      "delete": {
        "tags": [
          "Delivery"
        ],
        "summary": "Видалити контактну особу",
        "description": "Позначає контактну особу як видалену. Невалідний receiver_uuid — 422. Якщо запис не знайдено, повертається 404 з повідомленням «Не вдалося знайти отримувача».\n",
        "parameters": [
          {
            "name": "receiver_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDeleteReceiverResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Отримувача не знайдено серед контактів холдингу.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Не вдалося знайти отримувача",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [receiver_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [receiver_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/carrier/{carrier_uuid}": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Інформація про перевізника",
        "description": "Повертає детальну інформацію про перевізника та дані для повернення товару цим перевізником.",
        "parameters": [
          {
            "name": "carrier_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierInfoSchema"
                },
                "example": {
                  "uuid": "C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1",
                  "name": "Нова Пошта",
                  "receiver_name": "ТОВ Приклад",
                  "phone_number": 380441234567,
                  "warehouse_address": "Київ, вул. Хрещатик, 1",
                  "discount_money": 0.0,
                  "discount_delivery": 0.0
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/delivery/config/{config_uuid}": {
      "delete": {
        "tags": [
          "Delivery"
        ],
        "summary": "Видалити налаштування доставки",
        "description": "Позначає налаштування доставки як видалене. Якщо запис не існує, 404 завжди віддає стандартне тіло «Ресурс не знайдено». Вже marked — 422.\n",
        "parameters": [
          {
            "name": "config_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDeleteConfigResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Налаштування доставки успішно видалено",
                  "should_select_new_delivery_config": false
                }
              }
            }
          },
          "404": {
            "description": "Налаштування не існує. 404 завжди віддає стандартне тіло.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка перевірки параметрів запиту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Налаштування доставки вже позначено на видалення",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/couriers/rate/{waybill_uuid}": {
      "post": {
        "tags": [
          "Couriers"
        ],
        "summary": "Оцінити водія",
        "description": "Зберігає оцінку водія за шляховим листом. Невалідний UUID — 422 без тексту (`Помилка перевірки параметрів запиту`). Невдала форма — HTTP 200 `{success: false, message: Некоректні дані форми}`. Шляховий лист не знайдено — HTTP 404 `{success: false, message: Шляховий лист не знайдено}`. Ще не виконаний — HTTP 422 `{success: false, message: Шляховий лист ще не виконаний}`.\n",
        "parameters": [
          {
            "name": "waybill_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string"
                  },
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Оцінка від 1 до 5"
                  },
                  "tag_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateDriverResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Ви успішно оцінили водія"
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID або шляховий лист ще не виконаний",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "без тексту",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "not_completed": {
                    "summary": "Некоректні дані форми",
                    "value": {
                      "message": "Шляховий лист ще не виконаний",
                      "documentation_url": "https://developer.bm.parts/",
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/shopping/cart/{cart_uuid}": {
      "delete": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Видалити кошик",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingSuccessResponseSchema"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Видалити кошик",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "get": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Отримати кошик з позиціями товарів",
        "parameters": [
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartDetailResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    },
                    "products": []
                  },
                  "headers": [
                    {
                      "warehouse": "Київ",
                      "short_name": "Київ",
                      "is_main": true
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати кошик з позиціями товарів",
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Зміна кошика (назва, власник)",
        "description": "Оновлює назву або власника кошика. Порожня або занадто довга назва — 422 з текстами нижче.\n",
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "client_uuid": {
                    "type": "string",
                    "description": "UUID нового власника кошика (опціонально)"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Коментар до кошика (довший текст обрізається до 500 символів)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingCartUpdateResponseSchema"
                },
                "example": {
                  "cart": {
                    "uuid": "CART0000000000000000000000000001",
                    "name": "Основний кошик",
                    "weight": 1.25,
                    "total": 325.5,
                    "currency_name": "UAH",
                    "products_count": 2,
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ"
                    }
                  },
                  "updated": true
                }
              }
            }
          },
          "422": {
            "description": "Невалідна назва кошика або cart_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "empty_name": {
                    "summary": "Вказано некоректне значення параметру [name]",
                    "value": {
                      "message": "Вказано некоректне значення параметру [name]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "long_name": {
                    "summary": "Надто довга назва корзини",
                    "value": {
                      "message": "Надто довга назва корзини",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_cart": {
                    "summary": "Вказано некоректний ID кошика",
                    "value": {
                      "message": "Вказано некоректний ID кошика",
                      "documentation_url": "https://developer.bm.parts/",
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/company/warehouse/{warehouse_uuid}": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Деталі складу",
        "description": "Повертає один склад за UUID разом із графіком роботи. Якщо склад не знайдено, повертає 404 з повідомленням `Склад не знайдено`.\n",
        "parameters": [
          {
            "name": "warehouse_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID клієнта, для якого потрібно отримати склад"
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyWarehouseDetailResponseSchema"
                },
                "example": {
                  "warehouse": {
                    "uuid": "81F4005056AC66D611EAD7173350C7AA",
                    "name": "Київ",
                    "short_name": "Київ",
                    "address": "вул. Кирилівська, 1",
                    "latitude": "50.4501",
                    "longitude": "30.5234",
                    "map_link": null,
                    "work_time": [
                      {
                        "days": "Пн-Пт",
                        "times": "09:00 - 18:00"
                      }
                    ],
                    "is_main": true
                  }
                }
              }
            }
          },
          "404": {
            "description": "Склад не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyWarehouseNotFoundResponseSchema"
                },
                "example": {
                  "message": "Склад не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний client_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [client_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/profile/settings/{app_name}": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "Отримати налаштування клієнтського додатку",
        "description": "Отримати налаштування клієнтського додатку",
        "parameters": [
          {
            "name": "app_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettingsGetResponseSchema"
                },
                "example": {
                  "meta": {
                    "version": "0.0.1"
                  },
                  "settings": {
                    "currency": "81ED005056AC66D611EA474924EF8D11",
                    "warehouse_main": "81F4005056AC66D611EAD7173350C7AA"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Profile"
        ],
        "summary": "Створити або оновити налаштування клієнтського додатку",
        "description": "Зберігає JSON-налаштування додатку `app_name`. Поле `settings` приймає JSON-об'єкт або рядок з валідним JSON (до 2000 символів після серіалізації); опційно `version` у форматі `N.N.N`. Невдала валідація WTForms піднімає FormValidationError — 422 з `message: Помилка перевірки параметрів запиту` і словником `errors`. Помилка запису в БД — 500 без тексту, тобто `Помилка сервера`.\n",
        "parameters": [
          {
            "name": "app_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string"
                  },
                  "settings": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "JSON-об'єкт налаштувань (як надсилає Web)"
                      },
                      {
                        "type": "string",
                        "description": "JSON-об'єкт, серіалізований у рядок"
                      }
                    ]
                  }
                },
                "required": [
                  "settings"
                ]
              },
              "example": {
                "version": "0.0.1",
                "settings": {
                  "currency": "81ED005056AC66D611EA474924EF8D11"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettingsSaveResponseSchema"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "version": "0.0.1"
                  },
                  "settings": {
                    "currency": "81ED005056AC66D611EA474924EF8D11"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації форми налаштувань (FormValidationError)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "empty_settings": {
                    "summary": "Поле settings порожнє",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "settings": [
                          "Поле не може бути порожнім."
                        ]
                      }
                    }
                  },
                  "invalid_json": {
                    "summary": "settings не є валідним JSON",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "settings": [
                          "Некоректний JSON."
                        ]
                      }
                    }
                  },
                  "too_long": {
                    "summary": "settings довше 2000 символів",
                    "value": {
                      "message": "Помилка перевірки параметрів запиту",
                      "documentation_url": "https://developer.bm.parts/",
                      "errors": {
                        "settings": [
                          "Ви перевищили допустиму кількість налаштувань."
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера (500 без тексту при збої commit)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "summary": "Видалити налаштування клієнтського додатку",
        "description": "Видалити налаштування клієнтського додатку",
        "parameters": [
          {
            "name": "app_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSettingsDeleteResponseSchema"
                },
                "example": {
                  "success": true,
                  "message": "Налаштування успішно видалено."
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/catalog/nodes": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Список автомобільних вузлів (категорій)",
        "responses": {
          "200": {
            "description": "Список автомобільних вузлів",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogNodesResponseSchema"
                },
                "example": {
                  "nodes": [
                    {
                      "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                      "name": "Двигун",
                      "children_count": 8
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає вузли першого рівня для базового маршруту або дочірні вузли для UUID, переданого безпосередньо в шляху URL. Невалідний UUID у шляху дає 422 з типовим текстом хендлера.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}/in_waiting": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Очікувана кількість товару",
        "parameters": [
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Очікувані надходження товару",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInWaitingResponseSchema"
                },
                "example": {
                  "in_waiting": [
                    {
                      "uuid": "-",
                      "quantity": "-",
                      "name": "Приймається"
                    },
                    {
                      "uuid": "-",
                      "quantity": "-",
                      "name": "У дорозі"
                    },
                    {
                      "uuid": "-",
                      "quantity": "-",
                      "name": "Переміщується"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано недопустимий параметр [product_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустимий параметр [product_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Очікувана кількість товару",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}/in_stocks": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Залишки товару по всіх складах",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Залишки товару по складах",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInStocksResponseSchema"
                },
                "example": {
                  "in_stocks": [
                    {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ",
                      "quantity": "12",
                      "is_main": true,
                      "has_reserves": false,
                      "contract_quantities": [
                        {
                          "f": 0,
                          "quantity": "12"
                        }
                      ],
                      "labels": [
                        "Основний договір"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано недопустимий параметр [product_uuid] для типу [%(id_type)s]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустимий параметр [product_uuid] для типу [%(id_type)s]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Залишки товару по всіх складах",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}/images": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Отримати зображення товару",
        "parameters": [
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Список URL зображень товару",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductImagesResponseSchema"
                },
                "example": {
                  "images": [
                    "https://cdn.bm.parts/photos/a2/d9/oc47.jpg"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Вказано недопустиме значення параметра [product_uuid]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [product_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати зображення товару",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}/prices": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Ціна товару в основних валютах",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ціни товару в EUR, USD та UAH",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPricesListResponseSchema"
                },
                "example": {
                  "prices": [
                    {
                      "currency_name": "EUR",
                      "price": "7.80"
                    },
                    {
                      "currency_name": "USD",
                      "price": "8.50"
                    },
                    {
                      "currency_name": "UAH",
                      "price": "325.50"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Товар не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Вказано недопустимий параметр [product_uuid] для типу [%(id_type)s]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустимий параметр [product_uuid] для типу [%(id_type)s]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Ціна товару в основних валютах",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}/price": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Актуальна ціна товару",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "UUID валюти для розрахунку ціни",
            "required": false
          },
          {
            "name": "qnt",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Кількість товару для розрахунку загальної суми",
            "required": false
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Актуальна ціна товару для клієнта",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPriceResponseSchema"
                },
                "example": {
                  "price": "325.50",
                  "price_without_extra": "310.00",
                  "total": "325.50",
                  "total_without_extra": "310.00",
                  "extra": {
                    "type": "brand",
                    "value": 5.0
                  },
                  "currency_name": "UAH"
                }
              }
            }
          },
          "404": {
            "description": "Товар не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Вказано недопустиме значення параметру [product_uuid] для типу [%(id_type)s]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметру [product_uuid] для типу [%(id_type)s]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Актуальна ціна товару",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/claims/issue/{issue_id}": {
      "get": {
        "tags": [
          "Claims"
        ],
        "summary": "Отримати задачу",
        "description": "Повертає звернення Creatio за ID. Невалідний формат UUID 1С — 422 без тексту (`Помилка перевірки параметрів запиту`). Звернення не знайдено — 404 без тексту; обробник 404 завжди віддає `Ресурс не знайдено`.\n",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimsIssueResponseSchema"
                },
                "example": {
                  "issue": {
                    "issue_id": "09a8395d-9d8d-4651-8b82-0670a151dd0d",
                    "summary": "CS-123 - Тема",
                    "type": "Запит",
                    "state": "Нове",
                    "priority": "Середній",
                    "comments_count": 2,
                    "attachments_count": 0,
                    "is_resolved": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/prices/prom/{brand_name}": {
      "post": {
        "tags": [
          "Prices"
        ],
        "summary": "Отримати прайс для Prom.ua",
        "parameters": [
          {
            "name": "brand_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromPriceListRequestSchema"
              },
              "example": {
                "currency": "A358000C2947F7AE11E23F5617780B16",
                "warehouses": [
                  "81F4005056AC66D611EAD7173350C7AA"
                ],
                "full_product_name": true,
                "with_extra": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CSV-прайс для Prom.ua",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "Код_товару,Назва_позиції,Назва_позиції_укр,Опис,Опис_укр,Посилання_зображення,Тип_товару,Виробник,Країна_виробник,Ціна,Валюта,Кількість,Наявність,Одиниця_виміру,Ідентифікатор_товару,Де_знаходиться_товар,Назва_Характеристики,Одиниця_виміру_Характеристики,Значення_Характеристики,Назва_Характеристики,Одиниця_виміру_Характеристики,Значення_Характеристики\n"
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Бренд не знайдено або валюту не знайдено. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний параметр прайса, непідтримувана валюта або with_extra=true для API-ключа без логіна.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Currency is not supported for Prom.ua",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Формує CSV-прайс бренду у форматі Prom.ua. Непідтримувана валюта дає 422 Якщо бренду немає в БД — 404. При `with_extra=true` до кінцевої ціни після знижки застосовуються націнки поточного логіна з налаштувань B2B: за брендом, а потім за ціновим інтервалом, якщо націнку за брендом не застосовано. За замовчуванням `with_extra=false` — ціни без націнок. Для `with_extra=true` потрібен API-ключ, пов'язаний з логіном; інакше повертається 422.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/garage/car/{car_uuid}": {
      "get": {
        "tags": [
          "Garage"
        ],
        "summary": "Отримати дані про авто",
        "description": "Отримати дані про авто з гаража за UUID.",
        "parameters": [
          {
            "name": "car_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageCarResponseSchema"
                },
                "example": {
                  "car": {
                    "uuid": "A1B2C3D4E5F64789A0B1C2D3E4F50617",
                    "created_at": "2024-03-15T10:30:00",
                    "name": "Автомобіль 1",
                    "gov_number": "AA1234BB",
                    "vin_code": "YV1FW7381E1201989",
                    "car": "VOLVO, XC60"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Невалідний формат car_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [car_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Авто немає в гаражі. 404 ігнорується обробником 404 — у тілі завжди `Ресурс не знайдено`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Garage"
        ],
        "summary": "Оновити запис про авто з гаража",
        "description": "Змінює назву авто. Невалідний UUID — 422. Порожній `name` — 422. Якщо авто немає, `get_car` робить 404, але обробник 404 завжди віддає `Ресурс не знайдено`.\n",
        "parameters": [
          {
            "name": "car_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Нова назва авто"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageResultResponseSchema"
                },
                "example": {
                  "result": true
                }
              }
            }
          },
          "422": {
            "description": "Невалідний car_uuid або порожній name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "invalid_uuid": {
                    "summary": "Вказано недопустиме значення параметра [car_uuid]",
                    "value": {
                      "message": "Вказано недопустиме значення параметра [car_uuid]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "missing_name": {
                    "summary": "Необхідно передати значення параметра [name]",
                    "value": {
                      "message": "Необхідно передати значення параметра [name]",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Авто немає в гаражі. 404 ігнорується обробником 404 — у тілі завжди `Ресурс не знайдено`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Garage"
        ],
        "summary": "Видалити запис з гаража",
        "description": "Позначає авто як видалене. Невалідний UUID — 422. Якщо активного рядка немає, метод повертає `{result: false}`.\n",
        "parameters": [
          {
            "name": "car_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GarageResultResponseSchema"
                },
                "example": {
                  "result": true
                }
              }
            }
          },
          "422": {
            "description": "Невалідний формат car_uuid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано недопустиме значення параметра [car_uuid]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/brands/{name}/oe/{file_type}": {
      "get": {
        "tags": [
          "Brands"
        ],
        "summary": "Завантаження крос-листа бренду",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "zip",
                "xlsx"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Файл крос-листа (csv, zip або xlsx)",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "Артикул,Бренд,Назва,Конструкційний номер,Конструкційний бренд OC47,BOSCH,Оливний фільтр,, "
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Вказано некоректне значення параметра [file_type]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Вказано некоректне значення параметра [file_type]",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Завантажує крос-лист бренду у форматі csv, zip або xlsx. Інший `file_type` дає 422 Відсутній zip на CDN — 404. Доступна лише українська локалізація.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/complaints/{complaint_uuid}": {
      "get": {
        "tags": [
          "Complaints"
        ],
        "summary": "Отримати детальну інформацію по претензії",
        "description": "Повертає претензію з товарами та вкладеннями. `page` і `per_page` застосовуються тільки до масиву `products`; вкладення не пагінуються.\n",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "complaint_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplaintsDetailWrapperSchema"
                },
                "example": {
                  "complaint": {
                    "uuid": "BBE4000C2947F7AE11E2C0B59886A6B0",
                    "created_at": "2026-08-24T14:30:00",
                    "timer_to_response": null,
                    "title": "Претензія до РН-000123",
                    "reasons": [
                      "Брак"
                    ],
                    "status": {
                      "name": "Нова",
                      "uuid": "81F4005056AC66D611EAD7173350C7AA"
                    },
                    "can_edit": true,
                    "can_delete": true,
                    "document": {
                      "uuid": "8191005056BA39E811EBC9F072221C0D",
                      "number": "РН-000123",
                      "type": "0000013C",
                      "created_at": "2026-08-20T10:15:00"
                    },
                    "comments_count": 0,
                    "products": [
                      {
                        "product": {
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                          "article": "OC47",
                          "name": "Оливний фільтр",
                          "default_image": "https://cdn.bm.parts/photos/oc47.jpg",
                          "brand": {
                            "uuid": "81F4005056AC66D611EAD7173350C7AA",
                            "name": "BOSCH"
                          }
                        },
                        "quantity": 1,
                        "reason": {
                          "name": "Брак",
                          "uuid": "81F4005056AC66D611EAD7173350C7AA"
                        }
                      }
                    ],
                    "attachments": [
                      {
                        "id": "1-1",
                        "name": "photo.jpg",
                        "url": "https://api.bm.parts/complaints/issue/uuid/attachment"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/documents/{type_}/{uuid}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Отримати документ по UUID",
        "description": "Повертає документ за кодом типу та UUID. Невідомий type_ — 422. Невалідний uuid — 422. Тип без реалізації в коді — 501. Якщо документ не існує або не належить холдингу, Flask first_or_404 / 404 завжди віддає стандартне тіло 404.\n",
        "parameters": [
          {
            "name": "type_",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "document": {
                      "allOf": [
                        {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/SaleDocumentDetailSchema"
                            },
                            {
                              "$ref": "#/components/schemas/ClientOrderDocumentDetailSchema"
                            },
                            {
                              "$ref": "#/components/schemas/TTNDocumentDetailSchema"
                            },
                            {
                              "$ref": "#/components/schemas/ReturnDocumentDetailSchema"
                            },
                            {
                              "$ref": "#/components/schemas/PaymentDocumentSchema"
                            },
                            {
                              "$ref": "#/components/schemas/ReclamationDocumentSchema"
                            },
                            {
                              "$ref": "#/components/schemas/RefundRequestDocumentSchema"
                            },
                            {
                              "$ref": "#/components/schemas/IncomingPaymentDocumentSchema"
                            },
                            {
                              "$ref": "#/components/schemas/ServiceActDocumentSchema"
                            },
                            {
                              "$ref": "#/components/schemas/DebtAdjustmentDocument"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "edo_signed": {
                              "type": "boolean",
                              "description": "Ознака підписання документа через ЕДО"
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "document": {
                    "uuid": "8191005056BA39E811EBC9F072221C0D",
                    "number": "РН001234",
                    "type": "0000013C",
                    "document_name": "Видаткова накладна",
                    "created_at": "2026-08-14T12:00:00Z",
                    "shipped_at": "2026-08-14T12:30:00Z",
                    "total": 951.42,
                    "weight": 2.4,
                    "comment": "",
                    "marked": false,
                    "transmission_type": "Електронний документ",
                    "currency_rate": 1,
                    "currency": {
                      "name": "UAH"
                    },
                    "warehouse": {
                      "uuid": "81F4005056AC66D611EAD7173350C7AA",
                      "name": "Київ",
                      "address": "вул. Складська, 1"
                    },
                    "delivery_config": {
                      "name": "Нова Пошта, відділення №1"
                    },
                    "document_url": "https://developer.bm.parts/api/v2/documents/0000013C/8191005056BA39E811EBC9F072221C0D",
                    "owner": {
                      "uuid": "BBE4000C2947F7AE11E2C0B59886A6AF",
                      "name": "ТОВ Приклад",
                      "f": "zag"
                    },
                    "products": [
                      {
                        "quantity": 2,
                        "price": 475.71,
                        "total": 951.42,
                        "product": {
                          "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                          "article": "OC47",
                          "name": "Оливний фільтр",
                          "default_image": "https://images.bm.parts/OC47.jpg",
                          "brand": {
                            "name": "BOSCH"
                          }
                        },
                        "discount": 0,
                        "line_num": 1,
                        "certificate_url": null,
                        "uct_zed": []
                      }
                    ],
                    "ttn_documents": [],
                    "acts": [],
                    "can_create_complaint": false,
                    "can_create_reclamation": false,
                    "can_create_return": true,
                    "has_created_complaint": false,
                    "pdf": true,
                    "pdf_url": "https://developer.bm.parts/api/v2/documents/0000013C/8191005056BA39E811EBC9F072221C0D/pdf",
                    "excel": true,
                    "excel_url": "https://developer.bm.parts/api/v2/documents/0000013C/8191005056BA39E811EBC9F072221C0D/excel",
                    "csv": true,
                    "csv_url": "https://developer.bm.parts/api/v2/documents/0000013C/8191005056BA39E811EBC9F072221C0D/csv",
                    "invoice_pdf": false,
                    "edo_signed": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Документ не знайдено або недоступний контрагенту",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Некоректно сформований запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний тип або UUID документа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "examples": {
                  "unknown_type": {
                    "summary": "Запитуваний тип документа відсутній",
                    "value": {
                      "message": "Запитуваний тип документа відсутній",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  },
                  "invalid_uuid": {
                    "summary": "Некоректне значення ID документа",
                    "value": {
                      "message": "Некоректне значення ID документа",
                      "documentation_url": "https://developer.bm.parts/"
                    }
                  }
                }
              }
            }
          },
          "501": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Запитуваний документ не реалізовано",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Помилка сервера",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/trainings/{training_uuid}": {
      "get": {
        "tags": [
          "Trainings"
        ],
        "summary": "Отримати тренінг із зареєстрованими учасниками",
        "parameters": [
          {
            "name": "training_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingDetailResponseSchema"
                },
                "example": {
                  "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                  "name": "Тренінг з продажів",
                  "description": "Короткий опис тренінгу",
                  "body": "<p>Програма тренінгу</p>",
                  "location": "Київ, вул. Хрещатик 1",
                  "image_url": "https://cdn.bm.parts/trainings/cover.jpg",
                  "begin_at": "2026-09-01T09:00:00Z",
                  "end_at": "2026-09-01T18:00:00Z",
                  "check_in_before": "2026-08-31T18:00:00Z",
                  "free_places": 12,
                  "duration": 8.0,
                  "places_are_limited": true,
                  "icalendar_url": "https://api.bm.parts/trainings/A2D9EC97246EEB0B46877CB5803BFD99/iCalendar",
                  "participants": [
                    {
                      "key": "00000001",
                      "full_name": "Іван Петренко",
                      "name": "Іван",
                      "surname": "Петренко",
                      "position": "Менеджер",
                      "phone_number": "3806xxxxxx12",
                      "company": "ТОВ Приклад"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає деталі тренінгу та учасників поточного контрагента. Невалідний UUID — 422 без тексту (`Помилка перевірки параметрів запиту`). Тренінг не знайдено або не проведений — 404 без тексту; обробник 404 завжди `Ресурс не знайдено`.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/product/{product_uuid}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Отримати інформацію по товару",
        "parameters": [
          {
            "name": "products_as",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів",
            "required": false
          },
          {
            "name": "analogs_available",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "0"
              ],
              "default": "0"
            },
            "required": false
          },
          {
            "name": "promos",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "short",
                "full"
              ],
              "default": "short"
            },
            "required": false
          },
          {
            "name": "oe",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "short",
                "full"
              ],
              "default": "short"
            },
            "required": false
          },
          {
            "name": "output_field",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "analogs",
                "cars",
                "oe",
                "files",
                "components_of_kit",
                "buy_with",
                "paired_products"
              ],
              "default": "all"
            },
            "required": false
          },
          {
            "name": "available",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "with_extra",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "name": "id_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора",
            "required": false
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика для кількості в кошику",
            "required": false
          },
          {
            "name": "warehouses",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "UUID складів для розрахунку залишків",
            "required": false
          },
          {
            "name": "save",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Зберегти пошуковий запит",
            "required": false
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Пошуковий запит, за яким знайдено товар",
            "required": false
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Картка товару та заголовки колонок залишків",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductDetailResponseSchema"
                },
                "example": {
                  "product": {
                    "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                    "article": "OC47",
                    "brand": "BOSCH",
                    "name": "Оливний фільтр",
                    "price": "325.50",
                    "currency_name": "UAH",
                    "in_wishlist": false,
                    "available": true,
                    "found_by": "article",
                    "in_cart": {
                      "A2D9EC97246EEB0B46877CB5803BFD99": 1
                    },
                    "in_stocks": [
                      {
                        "uuid": "81F4005056AC66D611EAD7173350C7AA",
                        "name": "Київ",
                        "quantity": "12",
                        "short_name": "Київ",
                        "labels": [
                          "Основний договір"
                        ],
                        "is_main": true
                      }
                    ],
                    "analogs": null,
                    "oe": null
                  },
                  "headers": [
                    {
                      "warehouse": "Київ",
                      "short_name": "Київ",
                      "is_main": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "404": {
            "description": "Ресурс не знайдено (Not Found)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Отримати інформацію по товару",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/brands/{name}": {
      "get": {
        "tags": [
          "Brands"
        ],
        "summary": "Детальна інформація про бренд",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки",
            "required": false
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці",
            "required": false
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ua",
                "en"
              ]
            },
            "description": "Мова відповіді",
            "required": false
          },
          {
            "name": "text_mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "string",
                "html"
              ]
            },
            "required": false
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Детальна інформація про бренд",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandDetailResponseSchema"
                },
                "example": {
                  "uuid": "812C000C2999A7E611E55EB9C240D5C6",
                  "name": "4-MAX",
                  "products_count": 134,
                  "logo_url": "https://cdn.bm.parts/promo/brands/4-MAX.svg",
                  "website_url": "https://4-max.com",
                  "catalog_url": "",
                  "country": "США",
                  "supplied_as_oe": false,
                  "products_url": "https://api.bm.parts/search/products?brands=4-MAX",
                  "crosslist_csv": "",
                  "crosslist_xls": "",
                  "crosslist_xlsx": "",
                  "crosslist_zip": "",
                  "description": "Виробник автозапчастин",
                  "new": false,
                  "nodes": [
                    {
                      "node": "ПРИВОД",
                      "sub_nodes": [
                        {
                          "sub_node": "Система зчеплення та її складові"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Бренд не знайдено або в індексі більше одного запису з цією назвою. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "У доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації (Unprocessable Entity)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає картку бренду за назвою: опис, країна, вузли та посилання на крос-листи. Якщо бренд не знайдено або знайдено не один запис — 404.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/news/{news_uuid}": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "Отримати новину за UUID",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ua",
                "en"
              ]
            },
            "description": "Мова відповіді",
            "required": false
          },
          {
            "name": "news_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsDetailResponseSchema"
                },
                "example": {
                  "uuid": "A2D9EC97246EEB0B46877CB5803BFD99",
                  "name": "Нова акція BM Parts",
                  "description": "Короткий опис новини",
                  "body": "<p>Повний текст новини</p>",
                  "image_url": "https://cdn.bm.parts/news/cover.jpg",
                  "published_at": "2026-08-01T12:00:00Z",
                  "has_en": true,
                  "gallery": [
                    {
                      "is_video": false,
                      "resource_url": "https://cdn.bm.parts/news/gallery/1.jpg"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Новину не знайдено або вона ще не опублікована. 404 завжди віддає цей текст (хендлер ігнорує description).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Ресурс не знайдено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "422": {
            "description": "Невалідний UUID новини",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "400": {
            "description": "Невірний запит (Bad Request)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Невірно сформований запит",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "403": {
            "description": "В доступі відмовлено",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "В доступі відмовлено",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера (Internal Server Error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "message": "Помилка сервера",
                  "documentation_url": "https://developer.bm.parts/"
                }
              }
            }
          }
        },
        "description": "Повертає повний текст новини за UUID мовою `lang`. Невалідний UUID дає 422 з типовим текстом хендлера. Якщо новини немає або вона ще не опублікована — 404.",
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "openapi": "3.0.3",
  "components": {
    "schemas": {
      "AdvertBannerItemSchema": {
        "type": "object",
        "properties": {
          "banner_url": {
            "type": "string",
            "description": "URL банера",
            "example": "https://cdn.bm.parts/promo/home.jpg"
          },
          "has_children": {
            "type": "boolean",
            "description": "Є дочірні акції",
            "example": false
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID акції",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "banner_code": {
            "type": "string",
            "description": "Код банера",
            "example": "home"
          }
        },
        "required": [
          "banner_code",
          "banner_url"
        ]
      },
      "AdvertItemSchema": {
        "type": "object",
        "properties": {
          "children_count": {
            "type": "integer",
            "description": "Кількість дочірніх акцій",
            "example": 0
          },
          "target_type": {
            "type": "string",
            "description": "Тип цілі: `EUR`, `К-сть` (кількість) або `л` (літри)",
            "example": "EUR"
          },
          "registration_end_at": {
            "type": "string",
            "nullable": true,
            "description": "Кінець реєстрації на ІТП"
          },
          "uuid": {
            "type": "string",
            "description": "UUID акції",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "is_pso": {
            "type": "boolean",
            "description": "Індивідуальний план закупівель",
            "example": false
          },
          "registration_is_closed": {
            "type": "boolean",
            "description": "Реєстрація на ІТП закрита",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Опис акції",
            "example": "Опис акції"
          },
          "is_member": {
            "type": "boolean",
            "description": "Контрагент є учасником",
            "example": true
          },
          "show_progress": {
            "type": "boolean",
            "description": "Показувати прогрес",
            "example": true
          },
          "count_of_active_promos": {
            "type": "integer",
            "description": "Кількість активних дочірніх акцій",
            "example": 0
          },
          "finished": {
            "type": "boolean",
            "description": "Акція завершена",
            "example": false
          },
          "kind_uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID виду акції"
          },
          "one_time_gift": {
            "type": "boolean",
            "description": "Одноразовий подарунок",
            "example": false
          },
          "begin_at": {
            "type": "string",
            "description": "Початок акції",
            "example": "2026-06-01T00:00:00Z"
          },
          "end_at": {
            "type": "string",
            "description": "Кінець акції",
            "example": "2026-08-31T00:00:00Z"
          },
          "name": {
            "type": "string",
            "description": "Назва акції",
            "example": "Літня акція"
          },
          "banners": {
            "type": "object",
            "description": "Банери, ключ — banner_code",
            "additionalProperties": {
              "$ref": "#/components/schemas/AdvertBannerItemSchema"
            }
          },
          "date_to_analyze_from": {
            "type": "string",
            "nullable": true,
            "description": "Дата, з якої враховуються закупівлі для прогресу акції",
            "example": "2026-06-01T00:00:00Z"
          },
          "periodicity": {
            "type": "integer",
            "description": "Періодичність прогресу",
            "example": 0
          },
          "is_registered": {
            "type": "boolean",
            "description": "Зареєстрований на ІТП",
            "example": false
          },
          "has_children": {
            "type": "boolean",
            "description": "Є дочірні акції",
            "example": false
          }
        },
        "required": [
          "banners",
          "begin_at",
          "description",
          "end_at",
          "finished",
          "is_member",
          "name",
          "one_time_gift",
          "periodicity",
          "show_progress",
          "target_type",
          "uuid"
        ]
      },
      "AdvertDetailSchema": {
        "type": "object",
        "properties": {
          "children_count": {
            "type": "integer",
            "description": "Кількість дочірніх акцій",
            "example": 0
          },
          "target_type": {
            "type": "string",
            "description": "Тип цілі: `EUR`, `К-сть` (кількість) або `л` (літри)",
            "example": "EUR"
          },
          "registration_end_at": {
            "type": "string",
            "nullable": true,
            "description": "Кінець реєстрації на ІТП"
          },
          "uuid": {
            "type": "string",
            "description": "UUID акції",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "is_pso": {
            "type": "boolean",
            "description": "Індивідуальний план закупівель",
            "example": false
          },
          "registration_is_closed": {
            "type": "boolean",
            "description": "Реєстрація на ІТП закрита",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Опис акції",
            "example": "Опис акції"
          },
          "is_member": {
            "type": "boolean",
            "description": "Контрагент є учасником",
            "example": true
          },
          "progress_total": {
            "type": "number",
            "description": "Сумарний прогрес",
            "example": 1250.5
          },
          "show_progress": {
            "type": "boolean",
            "description": "Показувати прогрес",
            "example": true
          },
          "count_of_active_promos": {
            "type": "integer",
            "description": "Кількість активних дочірніх акцій",
            "example": 0
          },
          "finished": {
            "type": "boolean",
            "description": "Акція завершена",
            "example": false
          },
          "kind_uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID виду акції"
          },
          "one_time_gift": {
            "type": "boolean",
            "description": "Одноразовий подарунок",
            "example": false
          },
          "begin_at": {
            "type": "string",
            "description": "Початок акції",
            "example": "2026-06-01T00:00:00Z"
          },
          "end_at": {
            "type": "string",
            "description": "Кінець акції",
            "example": "2026-08-31T00:00:00Z"
          },
          "children": {
            "nullable": true,
            "description": "Дочірні акції, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvertItemSchema"
            }
          },
          "name": {
            "type": "string",
            "description": "Назва акції",
            "example": "Літня акція"
          },
          "banners": {
            "type": "object",
            "description": "Банери, ключ — banner_code",
            "additionalProperties": {
              "$ref": "#/components/schemas/AdvertBannerItemSchema"
            }
          },
          "date_to_analyze_from": {
            "type": "string",
            "nullable": true,
            "description": "Дата, з якої враховуються закупівлі для прогресу акції",
            "example": "2026-06-01T00:00:00Z"
          },
          "periodicity": {
            "type": "integer",
            "description": "Періодичність прогресу",
            "example": 0
          },
          "is_registered": {
            "type": "boolean",
            "description": "Зареєстрований на ІТП",
            "example": false
          },
          "has_children": {
            "type": "boolean",
            "description": "Є дочірні акції",
            "example": false
          }
        },
        "required": [
          "banners",
          "begin_at",
          "description",
          "end_at",
          "finished",
          "is_member",
          "name",
          "one_time_gift",
          "periodicity",
          "show_progress",
          "target_type",
          "uuid"
        ]
      },
      "AdvertDetailResponseSchema": {
        "type": "object",
        "properties": {
          "adverts": {
            "description": "Деталі акції",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdvertDetailSchema"
              }
            ]
          }
        },
        "required": [
          "adverts"
        ]
      },
      "AdvertProgressGiftSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Оливний фільтр"
          },
          "percentage": {
            "type": "number",
            "example": 50.0
          },
          "target": {
            "type": "number",
            "example": 1000.0
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "count": {
            "type": "integer",
            "example": 1
          },
          "default_image": {
            "type": "string",
            "example": "https://cdn.bm.parts/photos/320x320/gift.jpg"
          }
        },
        "required": [
          "count",
          "default_image",
          "percentage",
          "target",
          "title",
          "uuid"
        ]
      },
      "AdvertProgressSchema": {
        "type": "object",
        "properties": {
          "gifts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvertProgressGiftSchema"
            }
          },
          "target_type": {
            "type": "string",
            "description": "Тип цілі: `EUR`, `К-сть` (кількість) або `л` (літри)",
            "example": "EUR"
          },
          "progress_period": {
            "type": "string",
            "example": "За весь період акції"
          },
          "achieved_gift": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AdvertProgressGiftSchema"
              }
            ]
          },
          "winners_number": {
            "type": "integer",
            "example": 0
          },
          "is_pso": {
            "type": "boolean",
            "example": false
          },
          "percentage": {
            "type": "number",
            "example": 75.5
          },
          "show_progress": {
            "type": "boolean",
            "example": true
          },
          "nearest_gift_in": {
            "type": "number",
            "example": 250.0
          },
          "finished": {
            "type": "boolean",
            "example": false
          },
          "promo_type": {
            "type": "string",
            "example": "accumulation"
          },
          "total": {
            "type": "number",
            "nullable": true,
            "example": 5000.0
          },
          "one_time_gift": {
            "type": "boolean",
            "example": false
          },
          "nearest_place_in": {
            "type": "number",
            "nullable": true,
            "example": 10.0
          },
          "progress": {
            "type": "number",
            "example": 750.5
          },
          "name": {
            "type": "string",
            "example": "Літня акція"
          },
          "place": {
            "type": "integer",
            "nullable": true,
            "example": null
          },
          "progress_total": {
            "type": "number",
            "example": 1250.5
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "finished",
          "gifts",
          "name",
          "nearest_gift_in",
          "one_time_gift",
          "percentage",
          "progress_period",
          "progress_total",
          "promo_type",
          "show_progress",
          "target_type",
          "uuid",
          "winners_number"
        ]
      },
      "AdvertProgressListResponseSchema": {
        "type": "object",
        "properties": {
          "adverts": {
            "description": "Прогрес кількох акцій",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvertProgressSchema"
            }
          }
        },
        "required": [
          "adverts"
        ]
      },
      "AdvertsListResponseSchema": {
        "type": "object",
        "properties": {
          "adverts": {
            "nullable": true,
            "description": "Список акцій, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvertItemSchema"
            }
          }
        },
        "required": [
          "adverts"
        ]
      },
      "BannersListResponseSchema": {
        "type": "object",
        "properties": {
          "banners": {
            "nullable": true,
            "description": "Список банерів, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvertBannerItemSchema"
            }
          }
        },
        "required": [
          "banners"
        ]
      },
      "FaqItemSchema": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string",
            "description": "Відповідь",
            "example": "Зареєструйтеся на сторінці акції."
          },
          "id": {
            "type": "integer",
            "description": "Ідентифікатор питання",
            "example": 1
          },
          "question": {
            "type": "string",
            "description": "Питання",
            "example": "Як взяти участь в акції?"
          },
          "category": {
            "type": "string",
            "description": "Категорія питання",
            "example": "promo"
          }
        },
        "required": [
          "answer",
          "category",
          "id",
          "question"
        ]
      },
      "FaqsResponseSchema": {
        "type": "object",
        "properties": {
          "faqs": {
            "nullable": true,
            "description": "Список FAQ, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FaqItemSchema"
            }
          }
        },
        "required": [
          "faqs"
        ]
      },
      "PromoKindItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Назва виду акції",
            "example": "Всі"
          },
          "uuid": {
            "type": "string",
            "description": "UUID виду акції або all",
            "example": "all"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "PromoTypeItemSchema": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Ключ типу акції",
            "example": "current"
          },
          "value": {
            "type": "string",
            "description": "Назва типу акції",
            "example": "Дійсні"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "PsoGiftSchema": {
        "type": "object",
        "properties": {
          "is_selected": {
            "type": "boolean",
            "description": "Обраний подарунок",
            "example": false
          },
          "article": {
            "type": "string",
            "description": "Артикул",
            "example": "GIFT100"
          },
          "uuid": {
            "type": "string",
            "description": "UUID подарунка",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "name": {
            "type": "string",
            "description": "Назва подарунка",
            "example": "Сертифікат"
          },
          "default_image": {
            "type": "string",
            "description": "URL зображення",
            "example": "https://cdn.bm.parts/photos/gift.jpg"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "PsoCustomTargetSchema": {
        "type": "object",
        "properties": {
          "is_custom": {
            "type": "boolean",
            "example": true
          },
          "gifts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PsoGiftSchema"
            }
          },
          "target_type": {
            "type": "string",
            "description": "Тип цілі: `EUR`, `Кількість` або `л` (літри)",
            "example": "EUR"
          },
          "is_selected": {
            "type": "boolean",
            "example": false
          },
          "gift_card_value": {
            "type": "integer",
            "example": 500
          },
          "step": {
            "type": "integer",
            "example": 100
          },
          "target": {
            "type": "number",
            "example": 5500.0
          },
          "min_target": {
            "type": "number",
            "example": 5200.0
          }
        }
      },
      "PsoTargetSchema": {
        "type": "object",
        "properties": {
          "is_custom": {
            "type": "boolean",
            "description": "Індивідуальна ціль",
            "example": false
          },
          "gifts": {
            "description": "Подарунки цілі",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PsoGiftSchema"
            }
          },
          "target_type": {
            "type": "string",
            "description": "Тип цілі: `EUR`, `Кількість` або `л` (літри)",
            "example": "EUR"
          },
          "is_selected": {
            "type": "boolean",
            "description": "Ціль обрана",
            "example": false
          },
          "target": {
            "type": "number",
            "description": "Значення цілі",
            "example": 5000.0
          }
        }
      },
      "PsoCustomTargetResponseSchema": {
        "type": "object",
        "properties": {
          "custom_target": {
            "description": "Деталі індивідуальної цілі",
            "allOf": [
              {
                "$ref": "#/components/schemas/PsoCustomTargetSchema"
              }
            ]
          },
          "targets": {
            "description": "Порожній список для дочірнього контрагента",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PsoTargetSchema"
            }
          }
        }
      },
      "PsoPlansResponseSchema": {
        "type": "object",
        "properties": {
          "can_create_target": {
            "type": "boolean",
            "description": "Можна створити індивідуальну ціль",
            "example": true
          },
          "targets": {
            "description": "Список цілей і призів",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PsoTargetSchema"
            }
          }
        },
        "required": [
          "targets"
        ]
      },
      "PsoRegistrationResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Ціль і подарунок успішно обрано"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "PsoUnsubscribeResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Ви скасували участь в акції"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "RandomBannerResponseSchema": {
        "type": "object",
        "properties": {
          "banner": {
            "description": "Випадковий банер",
            "allOf": [
              {
                "$ref": "#/components/schemas/AdvertBannerItemSchema"
              }
            ]
          }
        },
        "required": [
          "banner"
        ]
      },
      "BrandSubNodeSchema": {
        "type": "object",
        "properties": {
          "sub_node": {
            "type": "string",
            "nullable": true,
            "description": "Вузол 2-го рівня",
            "example": "Каталоги товарів"
          }
        }
      },
      "BrandNodeSchema": {
        "type": "object",
        "properties": {
          "node": {
            "type": "string",
            "description": "Вузол верхнього рівня",
            "example": "АКСЕСУАРИ ТА ЗАСОБИ ДЛЯ ДОГЛЯДУ"
          },
          "sub_nodes": {
            "type": "array",
            "description": "Список підвузлів",
            "items": {
              "$ref": "#/components/schemas/BrandSubNodeSchema"
            }
          }
        },
        "required": [
          "node",
          "sub_nodes"
        ]
      },
      "BrandDetailResponseSchema": {
        "type": "object",
        "properties": {
          "website_url": {
            "type": "string",
            "nullable": true,
            "description": "Офіційний сайт"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Опис бренду"
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "Країна",
            "example": "США"
          },
          "additional_description": {
            "type": "string",
            "nullable": true,
            "description": "Додатковий опис (лише для менеджера)"
          },
          "supplied_as_oe": {
            "type": "boolean",
            "nullable": true,
            "description": "Ознака ОЕ",
            "example": false
          },
          "crosslist_xls": {
            "type": "string",
            "description": "Посилання на крос-лист XLS (Deprecated)",
            "deprecated": true
          },
          "crosslist_xlsx": {
            "type": "string",
            "description": "Посилання на крос-лист XLSX або порожній рядок"
          },
          "nodes": {
            "type": "array",
            "description": "Категорії бренду",
            "items": {
              "$ref": "#/components/schemas/BrandNodeSchema"
            }
          },
          "new": {
            "type": "boolean",
            "nullable": true,
            "description": "Ознака новинки",
            "example": false
          },
          "logo_url": {
            "type": "string",
            "nullable": true,
            "description": "URL логотипу"
          },
          "products_count": {
            "type": "integer",
            "description": "Кількість товарів",
            "example": 134
          },
          "crosslist_csv": {
            "type": "string",
            "description": "Посилання на крос-лист CSV або порожній рядок"
          },
          "products_url": {
            "type": "string",
            "description": "URL товарів бренду"
          },
          "catalog_url": {
            "type": "string",
            "nullable": true,
            "description": "Каталог бренду"
          },
          "name": {
            "type": "string",
            "description": "Назва бренду",
            "example": "4-MAX"
          },
          "crosslist_zip": {
            "type": "string",
            "description": "Посилання на крос-лист ZIP або порожній рядок"
          },
          "uuid": {
            "type": "string",
            "description": "UUID бренду",
            "example": "812C000C2999A7E611E55EB9C240D5C6"
          }
        },
        "required": [
          "name",
          "products_count",
          "uuid"
        ]
      },
      "BrandItemSchema": {
        "type": "object",
        "properties": {
          "new": {
            "type": "boolean",
            "description": "Ознака новинки",
            "example": false
          },
          "logo_url": {
            "type": "string",
            "nullable": true,
            "description": "URL логотипу бренду",
            "example": "https://cdn.bm.parts/promo/brands/4-MAX.svg"
          },
          "important": {
            "type": "boolean",
            "description": "Ознака важливого бренду",
            "example": true
          },
          "products_count": {
            "type": "integer",
            "description": "Кількість товарів",
            "example": 134
          },
          "name": {
            "type": "string",
            "description": "Назва бренду",
            "example": "4-MAX"
          }
        },
        "required": [
          "important",
          "logo_url",
          "name",
          "new",
          "products_count"
        ]
      },
      "BrandNodeCountSchema": {
        "type": "object",
        "properties": {
          "node": {
            "type": "string",
            "example": "ПРИВІД"
          },
          "brands_count": {
            "type": "integer",
            "example": 42
          }
        },
        "required": [
          "brands_count",
          "node"
        ]
      },
      "BrandsSearchHitsSchema": {
        "type": "object",
        "properties": {
          "hits": {
            "type": "integer",
            "description": "Загальна кількість брендів",
            "example": 120
          }
        },
        "required": [
          "hits"
        ]
      },
      "BrandNodesListResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Метадані пошуку",
            "allOf": [
              {
                "$ref": "#/components/schemas/BrandsSearchHitsSchema"
              }
            ]
          },
          "nodes": {
            "type": "array",
            "description": "Список вузлів верхнього рівня",
            "items": {
              "$ref": "#/components/schemas/BrandNodeCountSchema"
            }
          }
        },
        "required": [
          "nodes",
          "search"
        ]
      },
      "BrandSubNodeCountSchema": {
        "type": "object",
        "properties": {
          "sub_node": {
            "type": "string",
            "example": "Система зчеплення та її складові"
          },
          "brands_count": {
            "type": "integer",
            "example": 18
          }
        },
        "required": [
          "brands_count",
          "sub_node"
        ]
      },
      "BrandSubNodesListResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Метадані пошуку",
            "allOf": [
              {
                "$ref": "#/components/schemas/BrandsSearchHitsSchema"
              }
            ]
          },
          "sub_nodes": {
            "type": "array",
            "description": "Список вузлів 2-го рівня",
            "items": {
              "$ref": "#/components/schemas/BrandSubNodeCountSchema"
            }
          }
        },
        "required": [
          "search",
          "sub_nodes"
        ]
      },
      "BrandsListResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Метадані пошуку",
            "allOf": [
              {
                "$ref": "#/components/schemas/BrandsSearchHitsSchema"
              }
            ]
          },
          "brands": {
            "type": "array",
            "description": "Список брендів",
            "items": {
              "$ref": "#/components/schemas/BrandItemSchema"
            }
          }
        },
        "required": [
          "brands",
          "search"
        ]
      },
      "CarBrandItemSchema": {
        "type": "object",
        "properties": {
          "marked": {
            "type": "boolean",
            "example": false
          },
          "models_url": {
            "type": "string",
            "example": "https://api.bm.parts/catalog/cars/brand/A2D9EC97246EEB0B46877CB5803BFD99/models/"
          },
          "code": {
            "type": "string",
            "example": "BMW"
          },
          "name": {
            "type": "string",
            "example": "BMW"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "code",
          "marked",
          "models_url",
          "name",
          "uuid"
        ]
      },
      "CarBrandsResponseSchema": {
        "type": "object",
        "properties": {
          "car_brands": {
            "description": "Автомобільні марки",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarBrandItemSchema"
            }
          }
        },
        "required": [
          "car_brands"
        ]
      },
      "CarEngineItemSchema": {
        "type": "object",
        "properties": {
          "engine_volume": {
            "type": "integer",
            "example": 2500
          },
          "cylinders": {
            "type": "integer",
            "example": 6
          },
          "engine_power": {
            "type": "integer",
            "example": 141
          },
          "engine_type": {
            "type": "string",
            "example": "Бензин"
          },
          "engine_hourses": {
            "type": "integer",
            "example": 192
          }
        },
        "required": [
          "cylinders",
          "engine_hourses",
          "engine_power",
          "engine_type",
          "engine_volume"
        ]
      },
      "CarEnginesResponseSchema": {
        "type": "object",
        "properties": {
          "car_engines": {
            "description": "Модифікації двигунів",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarEngineItemSchema"
            }
          }
        },
        "required": [
          "car_engines"
        ]
      },
      "CarModelItemSchema": {
        "type": "object",
        "properties": {
          "year_begin": {
            "type": "integer",
            "example": 1995
          },
          "year_end": {
            "type": "integer",
            "example": 2004
          },
          "name": {
            "type": "string",
            "example": "5 (E39)"
          },
          "uuid": {
            "type": "string",
            "example": "B3E0FD08357FFC1C57988DC6914C0E00"
          }
        },
        "required": [
          "name",
          "uuid",
          "year_begin",
          "year_end"
        ]
      },
      "CarModelsResponseSchema": {
        "type": "object",
        "properties": {
          "car_models": {
            "description": "Моделі автомобільної марки",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarModelItemSchema"
            }
          }
        },
        "required": [
          "car_models"
        ]
      },
      "CatalogBrandItemSchema": {
        "type": "object",
        "properties": {
          "new": {
            "type": "boolean",
            "description": "Ознака новинки",
            "example": false
          },
          "name": {
            "type": "string",
            "description": "Назва бренду",
            "example": "BOSCH"
          },
          "products_count": {
            "type": "integer",
            "description": "Кількість товарів",
            "example": 134
          }
        },
        "required": [
          "name",
          "new",
          "products_count"
        ]
      },
      "CatalogSearchHitsSchema": {
        "type": "object",
        "properties": {
          "hits": {
            "type": "integer",
            "description": "Загальна кількість записів",
            "example": 120
          }
        },
        "required": [
          "hits"
        ]
      },
      "CatalogBrandsListResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Метадані пошуку",
            "allOf": [
              {
                "$ref": "#/components/schemas/CatalogSearchHitsSchema"
              }
            ]
          },
          "brands": {
            "description": "Список брендів виробників",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogBrandItemSchema"
            }
          }
        },
        "required": [
          "brands",
          "search"
        ]
      },
      "CatalogNewArrivalItemSchema": {
        "type": "object",
        "properties": {
          "products_count": {
            "type": "integer",
            "example": 36
          },
          "name": {
            "type": "string",
            "example": "Надходження 14.08.2026"
          },
          "arrived_at": {
            "type": "string",
            "description": "Дата надходження",
            "example": "2026-08-14T09:00:00"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "arrived_at",
          "name",
          "products_count",
          "uuid"
        ]
      },
      "CatalogNewArrivalsResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Метадані пошуку",
            "allOf": [
              {
                "$ref": "#/components/schemas/CatalogSearchHitsSchema"
              }
            ]
          },
          "new_arrivals": {
            "description": "Список нових надходжень",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogNewArrivalItemSchema"
            }
          }
        },
        "required": [
          "new_arrivals",
          "search"
        ]
      },
      "CatalogNodeItemSchema": {
        "type": "object",
        "properties": {
          "children_count": {
            "type": "integer",
            "description": "Кількість дочірніх вузлів",
            "example": 8
          },
          "name": {
            "type": "string",
            "description": "Назва вузла",
            "example": "Двигун"
          },
          "uuid": {
            "type": "string",
            "description": "UUID вузла",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "children_count",
          "name",
          "uuid"
        ]
      },
      "CatalogPathNodeItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Назва вузла",
            "example": "Фільтри"
          },
          "products_count": {
            "type": "integer",
            "description": "Кількість товарів",
            "example": 240
          },
          "path": {
            "type": "string",
            "description": "Повний шлях вузла",
            "example": "Двигун/Фільтри"
          }
        },
        "required": [
          "name",
          "path",
          "products_count"
        ]
      },
      "CatalogNodesPathResponseSchema": {
        "type": "object",
        "properties": {
          "nodes": {
            "description": "Вузли на заданому шляху",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogPathNodeItemSchema"
            }
          }
        },
        "required": [
          "nodes"
        ]
      },
      "CatalogNodesResponseSchema": {
        "type": "object",
        "properties": {
          "nodes": {
            "description": "Список автомобільних вузлів",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogNodeItemSchema"
            }
          }
        },
        "required": [
          "nodes"
        ]
      },
      "CdnAttachmentSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Відносний шлях до файлу на CDN",
            "example": "cdn/box/A2D9EC97246EEB0B46877CB5803BFD99/photo.jpg"
          },
          "name": {
            "type": "string",
            "description": "Ім'я файлу",
            "example": "photo.jpg"
          }
        },
        "required": [
          "name",
          "url"
        ]
      },
      "CdnPhotoDeleteResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "Текст помилки, якщо success=false",
            "example": "Помилка при видаленні фото."
          }
        },
        "required": [
          "success"
        ]
      },
      "CdnPhotoUploadResponseSchema": {
        "type": "object",
        "properties": {
          "attachments": {
            "description": "Завантажені файли",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CdnAttachmentSchema"
            }
          },
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "Текст помилки, якщо success=false",
            "example": "Вкажіть фото для завантаження."
          }
        },
        "required": [
          "success"
        ]
      },
      "ClaimsAttachFileResponseSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "photo.jpg"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ClaimsAttachmentSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "529bc2f8-0ee0-df11-971b-001d60e938c6"
          },
          "url": {
            "type": "string",
            "description": "URL вмісту файлу (додається в GET attachments)"
          },
          "name": {
            "type": "string",
            "example": "photo.jpg"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ClaimsAttachmentsResponseSchema": {
        "type": "object",
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsAttachmentSchema"
            }
          }
        },
        "required": [
          "attachments"
        ]
      },
      "ClaimsCalculateAmountEquipmentSchema": {
        "type": "object",
        "properties": {
          "qnt": {
            "type": "integer",
            "example": 2
          },
          "type_of_work": {
            "type": "string",
            "example": "92E6005056BA7D7A11ED512AD24DEA89"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        },
        "required": [
          "qnt",
          "type_of_work",
          "uuid"
        ]
      },
      "ClaimsCalculateAmountRequestSchema": {
        "type": "object",
        "properties": {
          "equipment": {
            "$ref": "#/components/schemas/ClaimsCalculateAmountEquipmentSchema"
          },
          "location": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "equipment",
          "location"
        ]
      },
      "ClaimsCalculateAmountResponseSchema": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "example": 4500.0
          }
        },
        "required": [
          "total"
        ]
      },
      "ClaimsCommentSchema": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "text": {
            "type": "string",
            "example": "Дякую за відповідь"
          },
          "issue_id": {
            "type": "string"
          },
          "author": {
            "type": "string",
            "example": "ТОВ Автосвіт"
          },
          "is_client": {
            "type": "boolean",
            "example": true
          },
          "id": {
            "type": "string",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        },
        "required": [
          "author",
          "created_at",
          "id",
          "issue_id",
          "text"
        ]
      },
      "ClaimsCommentsResponseSchema": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsCommentSchema"
            }
          }
        },
        "required": [
          "comments"
        ]
      },
      "ClaimsCreateIssueResponseSchema": {
        "type": "object",
        "properties": {
          "due_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "issue_id": {
            "type": "string",
            "example": "09a8395d-9d8d-4651-8b82-0670a151dd0d"
          }
        },
        "required": [
          "issue_id"
        ]
      },
      "ClaimsEquipmentItemSchema": {
        "type": "object",
        "properties": {
          "qnt": {
            "type": "integer",
            "example": 10
          },
          "name": {
            "type": "string",
            "example": "Діагностика"
          },
          "types_of_work": {
            "type": "array",
            "items": {}
          },
          "uuid": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "qnt",
          "uuid"
        ]
      },
      "ClaimsEquipmentResponseSchema": {
        "type": "object",
        "properties": {
          "equipment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsEquipmentItemSchema"
            }
          }
        },
        "required": [
          "equipment"
        ]
      },
      "ClaimsIdDescriptionSchema2": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "example": "Скарга на менеджера"
          },
          "id": {
            "type": "string",
            "example": "09a8395d-9d8d-4651-8b82-0670a151dd0d"
          }
        },
        "required": [
          "description",
          "id"
        ]
      },
      "ClaimsIssueSchema": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "nullable": true,
            "example": "Нове"
          },
          "resolved": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "attachments_count": {
            "type": "integer",
            "example": 0
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "example": "Тема"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Опис звернення"
          },
          "attachments_url": {
            "type": "string",
            "description": "URL вкладень (лише в списку звернень)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updater": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true,
            "example": "CS-123"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "Запит"
          },
          "product_uuid": {
            "type": "string",
            "nullable": true
          },
          "due_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "comments_count": {
            "type": "integer",
            "example": 2
          },
          "priority": {
            "type": "string",
            "nullable": true,
            "example": "Середній"
          },
          "serial_number": {
            "type": "string",
            "nullable": true
          },
          "type_id": {
            "type": "string",
            "nullable": true
          },
          "reporter": {
            "type": "string",
            "nullable": true,
            "example": "ТОВ Автосвіт"
          },
          "client_code": {
            "type": "string",
            "example": ""
          },
          "is_resolved": {
            "type": "boolean",
            "example": false
          },
          "comments_url": {
            "type": "string",
            "description": "URL коментарів (лише в списку звернень)"
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "example": "CS-123 - Тема"
          },
          "issue_id": {
            "type": "string",
            "example": "09a8395d-9d8d-4651-8b82-0670a151dd0d"
          }
        },
        "required": [
          "attachments_count",
          "client_code",
          "comments_count",
          "created_at",
          "is_resolved",
          "issue_id"
        ]
      },
      "ClaimsIssueResponseSchema": {
        "type": "object",
        "properties": {
          "issue": {
            "$ref": "#/components/schemas/ClaimsIssueSchema"
          }
        },
        "required": [
          "issue"
        ]
      },
      "ClaimsIssueSchema2": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "nullable": true,
            "example": "Нове"
          },
          "resolved": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "attachments_count": {
            "type": "integer",
            "example": 0
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "example": "Тема"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "example": "Опис звернення"
          },
          "attachments_url": {
            "type": "string",
            "description": "URL вкладень (лише в списку звернень)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updater": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true,
            "example": "CS-123"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "Запит"
          },
          "product_uuid": {
            "type": "string",
            "nullable": true
          },
          "due_time": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "comments_count": {
            "type": "integer",
            "example": 2
          },
          "priority": {
            "type": "string",
            "nullable": true,
            "example": "Середній"
          },
          "serial_number": {
            "type": "string",
            "nullable": true
          },
          "type_id": {
            "type": "string",
            "nullable": true
          },
          "reporter": {
            "type": "string",
            "nullable": true,
            "example": "ТОВ Автосвіт"
          },
          "client_code": {
            "type": "string",
            "example": ""
          },
          "is_resolved": {
            "type": "boolean",
            "example": false
          },
          "comments_url": {
            "type": "string",
            "description": "URL коментарів (лише в списку звернень)"
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "example": "CS-123 - Тема"
          },
          "issue_id": {
            "type": "string",
            "example": "09a8395d-9d8d-4651-8b82-0670a151dd0d"
          }
        },
        "required": [
          "attachments_count",
          "client_code",
          "comments_count",
          "created_at",
          "is_resolved",
          "issue_id"
        ]
      },
      "ClaimsIssuesResponseSchema": {
        "type": "object",
        "properties": {
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsIssueSchema2"
            }
          }
        },
        "required": [
          "issues"
        ]
      },
      "ClaimsNamedUuidSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "ClaimsLocationsResponseSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsNamedUuidSchema"
            }
          }
        },
        "required": [
          "locations"
        ]
      },
      "ClaimsNamedUuidSchema2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "ClaimsPrioritiesResponseSchema": {
        "type": "object",
        "properties": {
          "priorities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsIdDescriptionSchema2"
            }
          }
        },
        "required": [
          "priorities"
        ]
      },
      "ClaimsProductErrorItemSchema": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "c4c1ae6d-2911-4763-ba88-3af8c8d6b47f"
          },
          "value": {
            "type": "string",
            "example": "Неправильний аналог"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "ClaimsSuccessResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "success"
        ]
      },
      "ClaimsTypesOfWorkResponseSchema": {
        "type": "object",
        "properties": {
          "types_of_work": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsNamedUuidSchema2"
            }
          }
        },
        "required": [
          "types_of_work"
        ]
      },
      "ClaimsTypesResponseSchema": {
        "type": "object",
        "properties": {
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimsIdDescriptionSchema2"
            }
          }
        },
        "required": [
          "types"
        ]
      },
      "CompanyTimetableItemSchema": {
        "type": "object",
        "properties": {
          "days": {
            "type": "string",
            "example": "Пн-Пт"
          },
          "time": {
            "type": "string",
            "example": "09:00 - 19:00"
          }
        }
      },
      "CompanyPhoneExtendedSchema": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "example": "+38 (096) 647-77-11"
          },
          "operator": {
            "type": "string",
            "example": "kyivstar"
          }
        }
      },
      "CompanyContactCenterSchema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "sales@busmarket.ua"
          },
          "timetable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyTimetableItemSchema"
            }
          },
          "phones_extended": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyPhoneExtendedSchema"
            }
          },
          "phones": {
            "type": "array",
            "example": [
              "+38 (096) 647-77-11"
            ],
            "items": {
              "type": "string"
            }
          },
          "skypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CompanyContactInfoResponseSchema": {
        "type": "object",
        "properties": {
          "contact_center": {
            "$ref": "#/components/schemas/CompanyContactCenterSchema"
          }
        }
      },
      "CompanyManagerItemSchema": {
        "type": "object",
        "properties": {
          "photo_url": {
            "type": "string",
            "nullable": true,
            "example": "https://cdn.bm.parts/promo/managers/ivan.png"
          },
          "all_mobiles": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "mobile": {
            "type": "string",
            "nullable": true,
            "example": "+380501234567"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "example": "manager@bm.parts"
          },
          "internal": {
            "type": "string",
            "nullable": true,
            "example": "1234"
          },
          "skype": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Іван Петренко"
          }
        }
      },
      "CompanyManagerResponseSchema": {
        "type": "object",
        "properties": {
          "manager": {
            "$ref": "#/components/schemas/CompanyManagerItemSchema"
          }
        }
      },
      "CompanyPartnerCatalogItemSchema": {
        "type": "object",
        "properties": {
          "image_url": {
            "type": "string",
            "example": "https://cdn.bm.parts/partners/logo.png"
          },
          "title": {
            "type": "string",
            "example": "Каталог партнера"
          },
          "url": {
            "type": "string",
            "example": "https://partner.example/catalog"
          }
        },
        "required": [
          "image_url",
          "title",
          "url"
        ]
      },
      "CompanyPartnersCatalogsResponseSchema": {
        "type": "object",
        "properties": {
          "partners_catalogs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyPartnerCatalogItemSchema"
            }
          }
        }
      },
      "CompanyServiceItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Очікується"
          },
          "uuid": {
            "type": "string",
            "example": "waiting"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "CompanyWorkTimeItemSchema": {
        "type": "object",
        "properties": {
          "times": {
            "type": "string",
            "example": "09:00 - 18:00"
          },
          "days": {
            "type": "string",
            "example": "Пн-Пт"
          }
        },
        "required": [
          "days",
          "times"
        ]
      },
      "CompanyWarehouseItemSchema": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean",
            "example": true
          },
          "map_link": {
            "type": "string",
            "nullable": true
          },
          "longitude": {
            "type": "string",
            "nullable": true,
            "example": "30.5234"
          },
          "short_name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "work_time": {
            "type": "array",
            "nullable": true,
            "description": "Відформатований графік роботи складу",
            "items": {
              "$ref": "#/components/schemas/CompanyWorkTimeItemSchema"
            }
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "вул. Кирилівська, 1"
          },
          "latitude": {
            "type": "string",
            "nullable": true,
            "example": "50.4501"
          },
          "name": {
            "type": "string",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "CompanyWarehouseDetailResponseSchema": {
        "type": "object",
        "properties": {
          "warehouse": {
            "$ref": "#/components/schemas/CompanyWarehouseItemSchema"
          }
        }
      },
      "CompanyWarehouseItemSchema2": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean",
            "example": true
          },
          "map_link": {
            "type": "string",
            "nullable": true
          },
          "longitude": {
            "type": "string",
            "nullable": true,
            "example": "30.5234"
          },
          "short_name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "work_time": {
            "type": "array",
            "nullable": true,
            "description": "Відформатований графік роботи складу",
            "items": {
              "$ref": "#/components/schemas/CompanyWorkTimeItemSchema"
            }
          },
          "address": {
            "type": "string",
            "nullable": true,
            "example": "вул. Кирилівська, 1"
          },
          "latitude": {
            "type": "string",
            "nullable": true,
            "example": "50.4501"
          },
          "name": {
            "type": "string",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "CompanyWarehouseNotFoundResponseSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Склад не знайдено"
          },
          "documentation_url": {
            "type": "string",
            "example": "https://developer.bm.parts/"
          }
        },
        "required": [
          "documentation_url",
          "message"
        ]
      },
      "CompanyWarehousesResponseSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Присутнє, якщо склади не заповнені"
          },
          "service": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyServiceItemSchema"
            }
          },
          "warehouses": {
            "type": "array",
            "nullable": true,
            "description": "Список складів або null, якщо не заповнені",
            "items": {
              "$ref": "#/components/schemas/CompanyWarehouseItemSchema2"
            }
          }
        }
      },
      "ComplaintsAttachmentSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "example": "https://api.bm.parts/complaints/issue/uuid/attachment/1/photo.jpg"
          },
          "name": {
            "type": "string",
            "example": "photo.jpg"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ComplaintsAttachmentsResponseSchema": {
        "type": "object",
        "properties": {
          "attachments": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsAttachmentSchema"
            }
          }
        }
      },
      "ComplaintsBrandSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "BOSCH"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsCauseItemSchema": {
        "type": "object",
        "properties": {
          "photo_required": {
            "type": "boolean",
            "example": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "example": "Брак"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsCausesResponseSchema": {
        "type": "object",
        "properties": {
          "complaint_causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplaintsCauseItemSchema"
            }
          }
        }
      },
      "ComplaintsCommentSchema": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true,
            "example": "Дякую за відповідь"
          },
          "issue_id": {
            "type": "string"
          },
          "author": {
            "type": "string",
            "nullable": true,
            "example": "ТОВ Автосвіт"
          },
          "is_client": {
            "type": "boolean",
            "example": true
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "ComplaintsCommentsResponseSchema": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsCommentSchema"
            }
          }
        }
      },
      "ComplaintsCreateProductResultSchema": {
        "type": "object",
        "properties": {
          "errors": {
            "nullable": true
          },
          "cause_uuid": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "result": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "product_uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsCreateResponseSchema": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "object"
          },
          "error": {
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "photo_required": {
            "type": "boolean",
            "example": false
          },
          "result": {
            "type": "boolean",
            "example": true
          },
          "complaint_uuid": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsCreateProductResultSchema"
            }
          }
        },
        "required": [
          "error",
          "result"
        ]
      },
      "ComplaintsStatusSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Нова"
          },
          "uuid": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ComplaintsProductForCreateSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/ComplaintsBrandSchema"
          },
          "quantity": {
            "type": "integer",
            "example": 2
          },
          "article": {
            "type": "string",
            "nullable": true,
            "example": "OC47"
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Оливний фільтр"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ComplaintsProductInDetailSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ComplaintsProductForCreateSchema"
          },
          "quantity": {
            "type": "integer"
          },
          "reason": {
            "type": "object"
          }
        }
      },
      "ComplaintsDocumentRefSchema": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "example": "0000013C"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsDetailResponseSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "comments_count": {
            "type": "integer",
            "example": 0
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ComplaintsStatusSchema"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "can_delete": {
            "type": "boolean"
          },
          "products": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsProductInDetailSchema"
            }
          },
          "document": {
            "$ref": "#/components/schemas/ComplaintsDocumentRefSchema"
          },
          "attachments": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsAttachmentSchema"
            }
          },
          "timer_to_response": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "can_edit": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsDetailWrapperSchema": {
        "type": "object",
        "properties": {
          "complaint": {
            "$ref": "#/components/schemas/ComplaintsDetailResponseSchema"
          }
        }
      },
      "ComplaintsDocumentOwnerSchema": {
        "type": "object",
        "properties": {
          "f": {
            "type": "integer",
            "example": 0
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsDocumentItemSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "$ref": "#/components/schemas/ComplaintsDocumentOwnerSchema"
          },
          "total": {
            "type": "number",
            "nullable": true,
            "example": 15230.5
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currency_name": {
            "type": "string",
            "nullable": true,
            "example": "UAH"
          },
          "url": {
            "type": "string"
          },
          "number": {
            "type": "string",
            "nullable": true,
            "example": "РН-000123"
          },
          "type": {
            "type": "string",
            "example": "0000013C"
          },
          "uuid": {
            "type": "string"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ComplaintsDocumentRefSchema2": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "example": "0000013C"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsDocumentsResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsDocumentItemSchema"
            }
          }
        }
      },
      "ComplaintsEditProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ComplaintsProductForCreateSchema"
          },
          "reason": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ComplaintsStatusSchema"
              }
            ]
          },
          "sold_quantity": {
            "type": "integer",
            "example": 2
          },
          "is_missing": {
            "type": "boolean",
            "example": false
          },
          "quantity": {
            "type": "integer",
            "example": 1
          },
          "available": {
            "type": "integer",
            "example": 1
          }
        }
      },
      "ComplaintsEditDataResponseSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ComplaintsStatusSchema"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "document": {
            "$ref": "#/components/schemas/ComplaintsDocumentRefSchema2"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplaintsEditProductSchema"
            }
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ComplaintsListItemSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true,
            "example": "Претензія до РН-000123"
          },
          "comments_count": {
            "type": "integer",
            "example": 0
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ComplaintsStatusSchema"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "can_delete": {
            "type": "boolean",
            "example": true
          },
          "document_uuid": {
            "type": "string"
          },
          "timer_to_response": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "can_edit": {
            "type": "boolean",
            "example": true
          },
          "uuid": {
            "type": "string"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ComplaintsListResponseSchema": {
        "type": "object",
        "properties": {
          "complaints": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsListItemSchema"
            }
          }
        }
      },
      "ComplaintsMessageResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Претензію успішно змінено"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "ComplaintsProductForCreateSchema2": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/ComplaintsBrandSchema"
          },
          "quantity": {
            "type": "integer",
            "example": 2
          },
          "article": {
            "type": "string",
            "nullable": true,
            "example": "OC47"
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Оливний фільтр"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ComplaintsProductsResponseSchema": {
        "type": "object",
        "properties": {
          "not_delivered_status_access": {
            "type": "boolean",
            "example": false
          },
          "products": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ComplaintsProductForCreateSchema2"
            }
          }
        },
        "required": [
          "not_delivered_status_access"
        ]
      },
      "ComplaintsRequestProductSchema": {
        "type": "object",
        "properties": {
          "product_uuid": {
            "type": "string"
          },
          "cause_uuid": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "example": 1
          }
        },
        "required": [
          "cause_uuid",
          "product_uuid",
          "quantity"
        ]
      },
      "ComplaintsRequestSchema": {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplaintsRequestProductSchema"
            }
          }
        },
        "required": [
          "products"
        ]
      },
      "ComplaintsValidationResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "CourierDriverSchema": {
        "type": "object",
        "properties": {
          "photo_url": {
            "type": "string",
            "nullable": true,
            "example": "https://cdn.bm.parts/image/workers/abc.jpeg"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Іван Петренко"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "example": "+380501112233"
          }
        }
      },
      "CourierTtnSchema": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "nullable": true,
            "example": "ТТН-12345"
          },
          "document_type": {
            "type": "string",
            "nullable": true,
            "example": "00003A4D"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        }
      },
      "CourierMoneySchema": {
        "type": "object",
        "properties": {
          "sum": {
            "type": "number",
            "nullable": true,
            "example": 1500.0
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "example": "ГРН"
          }
        }
      },
      "ActiveRoutePointSchema": {
        "type": "object",
        "properties": {
          "position": {
            "type": "integer",
            "nullable": true,
            "example": 45
          },
          "delivery_address": {
            "type": "string",
            "nullable": true,
            "example": "вул. Львівська 17/15"
          },
          "will_arrive": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-14T17:05:00Z"
          }
        }
      },
      "ActiveRouteSchema": {
        "type": "object",
        "properties": {
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveRoutePointSchema"
            }
          },
          "progress": {
            "type": "number",
            "nullable": true,
            "example": 45.0
          },
          "start": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-14T08:00:00Z"
          },
          "finish": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-14T18:00:00Z"
          }
        }
      },
      "CourierCarSchema": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "nullable": true,
            "example": "AA1234BB"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Renault Master"
          },
          "colour": {
            "type": "string",
            "nullable": true,
            "example": "білий"
          }
        }
      },
      "ActiveDepartureSchema": {
        "type": "object",
        "properties": {
          "driver": {
            "$ref": "#/components/schemas/CourierDriverSchema"
          },
          "ttn": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourierTtnSchema"
            }
          },
          "total": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CourierMoneySchema"
              }
            ]
          },
          "return_money": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CourierMoneySchema"
              }
            ]
          },
          "warehouse_name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "returns": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "places": {
            "type": "integer",
            "example": 3
          },
          "weight": {
            "type": "number",
            "example": 12.5
          },
          "route": {
            "$ref": "#/components/schemas/ActiveRouteSchema"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "product_returns": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "delivery_type": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "car": {
            "$ref": "#/components/schemas/CourierCarSchema"
          }
        }
      },
      "ActiveDeparturesResponseSchema": {
        "type": "object",
        "properties": {
          "active_departures": {
            "nullable": true,
            "description": "Активні рейси, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveDepartureSchema"
            }
          }
        },
        "required": [
          "active_departures"
        ]
      },
      "CourierFeedbackSchema": {
        "type": "object",
        "properties": {
          "score": {
            "type": "integer",
            "nullable": true,
            "example": 5
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "example": "Дякую"
          }
        }
      },
      "ArchiveRoutePointSchema": {
        "type": "object",
        "properties": {
          "delivery_end": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-13T18:00:00Z"
          },
          "delivery_address": {
            "type": "string",
            "nullable": true,
            "example": "вул. Львівська 17/15"
          }
        }
      },
      "ArchiveRouteSchema": {
        "type": "object",
        "properties": {
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveRoutePointSchema"
            }
          }
        }
      },
      "ArchiveDepartureSchema": {
        "type": "object",
        "properties": {
          "is_ratable": {
            "type": "boolean",
            "example": true
          },
          "driver": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CourierDriverSchema"
              }
            ]
          },
          "ttn": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourierTtnSchema"
            }
          },
          "total": {
            "$ref": "#/components/schemas/CourierMoneySchema"
          },
          "warehouse_name": {
            "type": "string",
            "nullable": true
          },
          "feedback": {
            "$ref": "#/components/schemas/CourierFeedbackSchema"
          },
          "route": {
            "$ref": "#/components/schemas/ArchiveRouteSchema"
          },
          "waybill_uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "boolean"
          },
          "delivery_type": {
            "type": "string"
          }
        }
      },
      "ArchiveDeparturesResponseSchema": {
        "type": "object",
        "properties": {
          "archive_departures": {
            "nullable": true,
            "description": "Архівні рейси, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveDepartureSchema"
            }
          }
        },
        "required": [
          "archive_departures"
        ]
      },
      "CourierTagItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Ввічливий"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        }
      },
      "CourierTagsGroupsSchema": {
        "type": "object",
        "properties": {
          "positive": {
            "nullable": true,
            "description": "Позитивні теги, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourierTagItemSchema"
            }
          },
          "negative": {
            "nullable": true,
            "description": "Негативні теги, або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourierTagItemSchema"
            }
          }
        }
      },
      "CourierTagsResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "description": "false, якщо сталася помилка",
            "example": false
          },
          "tags": {
            "description": "Теги для оцінки водія",
            "allOf": [
              {
                "$ref": "#/components/schemas/CourierTagsGroupsSchema"
              }
            ]
          }
        }
      },
      "DeparturesCountResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "description": "false, якщо сталася помилка",
            "example": false
          },
          "archived_waybill_count": {
            "type": "integer",
            "description": "Кількість архівних виїздів",
            "example": 10
          },
          "waybill_count": {
            "type": "integer",
            "description": "Кількість активних виїздів",
            "example": 3
          }
        }
      },
      "RateDriverResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Ви успішно оцінили водія"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "CarrierInfoSchema": {
        "type": "object",
        "properties": {
          "receiver_name": {
            "type": "string"
          },
          "edrpou": {
            "type": "string"
          },
          "discount_delivery": {
            "type": "number",
            "nullable": true
          },
          "discount_money": {
            "type": "number",
            "nullable": true
          },
          "phone_number": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "warehouse_address": {
            "readOnly": true,
            "type": "string",
            "example": "Київ, вул. Хрещатик, 1"
          }
        }
      },
      "CarrierSchema": {
        "type": "object",
        "properties": {
          "discount_money": {
            "type": "number",
            "nullable": true
          },
          "discount_delivery": {
            "type": "number",
            "nullable": true
          },
          "address_delivery": {
            "type": "boolean",
            "nullable": true
          },
          "warehouses_url": {},
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "warehouses_count": {
            "type": "integer"
          }
        }
      },
      "CarrierWarehouseSchema": {
        "type": "object",
        "properties": {
          "working_hours": {
            "nullable": true,
            "description": "ГрафикРаботы"
          },
          "city": {
            "nullable": true,
            "type": "object",
            "properties": {
              "name": {
                "nullable": true
              },
              "region": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true
                  }
                }
              }
            }
          },
          "lat": {
            "nullable": true,
            "description": "Широта"
          },
          "lng": {
            "nullable": true,
            "description": "Долгота"
          },
          "for_internal_logistics": {
            "type": "boolean",
            "nullable": true,
            "description": "ДляВнутреннейЛогистики"
          },
          "address": {
            "nullable": true,
            "description": "Адрес"
          },
          "max_weight": {
            "nullable": true,
            "description": "МаксимальныйВес"
          },
          "phones": {
            "nullable": true,
            "description": "Телефоны"
          },
          "name": {
            "nullable": true,
            "description": "Наименование"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Уникальный идентификатор"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "CitySchema": {
        "type": "object",
        "properties": {
          "name": {
            "nullable": true
          },
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Уникальный идентификатор"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "DeliveryDepartureSlotSchema": {
        "type": "object",
        "properties": {
          "receipt_date": {
            "type": "string"
          },
          "departure_date": {
            "type": "string"
          }
        }
      },
      "DeliveryCarrierDepartureSchema": {
        "type": "object",
        "properties": {
          "discount_money": {
            "type": "number"
          },
          "discount_delivery": {
            "type": "number"
          },
          "departures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryDepartureSlotSchema"
            }
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DeliveryCarriersListResponseSchema": {
        "type": "object",
        "properties": {
          "carriers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierSchema"
            }
          }
        }
      },
      "DeliveryCitiesResponseSchema": {
        "type": "object",
        "properties": {
          "cities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitySchema"
            }
          }
        }
      },
      "DeliveryConfigSchema": {
        "type": "object",
        "properties": {
          "carrier_warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адрес"
              },
              "name": {
                "nullable": true,
                "description": "Наименование"
              },
              "max_weight": {
                "nullable": true,
                "description": "МаксимальныйВес"
              }
            }
          },
          "address_delivery": {
            "type": "boolean",
            "nullable": true,
            "description": "АдреснаяДоставка"
          },
          "is_default": {
            "type": "boolean"
          },
          "city": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true
              },
              "region": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true
                  }
                }
              }
            }
          },
          "carrier": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string"
              }
            }
          },
          "return_money": {
            "type": "boolean",
            "nullable": true,
            "description": "ОбратнаяДоставка"
          },
          "note": {
            "type": "string",
            "nullable": true,
            "description": "Примечание"
          },
          "house": {
            "type": "string",
            "nullable": true,
            "maxLength": 10,
            "description": "НомерДома"
          },
          "flat": {
            "type": "string",
            "nullable": true,
            "maxLength": 10,
            "description": "НомерКвартиры"
          },
          "full_insurance": {
            "type": "boolean",
            "nullable": true,
            "description": "ПолнаяСтраховка"
          },
          "receiver": {
            "type": "object",
            "properties": {
              "full_name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "restricted_delivery": {
            "type": "boolean"
          },
          "address": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "Адрес"
          },
          "is_paid_delivery": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "DeliveryConfigsResponseSchema": {
        "type": "object",
        "properties": {
          "configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryConfigSchema"
            }
          }
        }
      },
      "DeliveryConfirmConfigResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "config": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DeliveryConfigSchema"
              }
            ]
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "DeliveryCreateConfigResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "config": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DeliveryConfigSchema"
              }
            ]
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReceiverOutputSchema": {
        "type": "object",
        "properties": {
          "full_name": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "readOnly": true,
            "type": "string",
            "example": "+380501234567"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DeliveryCreateReceiverResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "receiver": {
            "$ref": "#/components/schemas/ReceiverOutputSchema"
          }
        }
      },
      "DeliveryDeleteConfigResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "should_select_new_delivery_config": {
            "type": "boolean",
            "example": false
          },
          "message": {
            "type": "string",
            "example": "Налаштування доставки успішно видалено"
          }
        }
      },
      "DeliveryDeleteReceiverResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "DeliveryReceiversResponseSchema": {
        "type": "object",
        "properties": {
          "receivers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiverOutputSchema"
            }
          }
        }
      },
      "RegionSchema": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Уникальный идентификатор"
          },
          "name": {
            "nullable": true
          },
          "cities_url": {}
        },
        "required": [
          "uuid"
        ]
      },
      "DeliveryRegionsResponseSchema": {
        "type": "object",
        "properties": {
          "regions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegionSchema"
            }
          }
        }
      },
      "DeliverySetDefaultResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "DeliveryStreetsResponseSchema": {
        "type": "object",
        "properties": {
          "streets": {
            "type": "array",
            "example": [
              "Хрещатик",
              "Саксаганського"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DeliveryTrackParcelResponseSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true,
            "example": "У дорозі"
          }
        }
      },
      "DeliveryWarehouseDepartureItemSchema": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean"
          },
          "receipt_at": {
            "type": "string",
            "nullable": true
          },
          "route_at": {
            "type": "string",
            "nullable": true
          },
          "short_name": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DeliveryWarehousesDeparturesResponseSchema": {
        "type": "object",
        "properties": {
          "warehouses": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryWarehouseDepartureItemSchema"
            }
          }
        }
      },
      "DeliveryWarehousesResponseSchema": {
        "type": "object",
        "properties": {
          "warehouses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierWarehouseSchema"
            }
          }
        }
      },
      "BrandNestedSchema": {
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "description": "Наименование"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ClientOrderDocumentProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "properties": {
              "brand": {
                "$ref": "#/components/schemas/BrandNestedSchema"
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "default_image": {
                "readOnly": true,
                "description": "URL зображення товару",
                "example": "https://cdn.bm.parts/photos/oc47.jpg"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "total": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "discount": {
            "nullable": true,
            "description": "ПроцентСкидкиНаценки"
          },
          "quantity": {
            "nullable": true,
            "description": "Количество"
          },
          "line_num": {
            "nullable": true,
            "description": "НомерСтроки"
          }
        }
      },
      "ClientOrderDocumentDetailSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "shipped_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаРейса",
            "pattern": null
          },
          "owner": {
            "type": "object"
          },
          "currency_rate": {
            "nullable": true,
            "description": "КурсВзаиморасчетов"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientOrderDocumentProductSchema"
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "excel_url": {},
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "excel": {
            "type": "boolean"
          },
          "total": {
            "type": "number"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адреса"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "nullable": true,
            "description": "Комментарий"
          },
          "delivery_config": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "weight": {
            "nullable": true,
            "description": "ВесДокумента"
          },
          "csv_url": {},
          "pdf_url": {},
          "document_url": {},
          "csv": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "DebtAdjustmentDocument": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "object"
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "total": {
            "type": "number",
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "maxLength": 250,
            "description": "Комментарий"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата",
            "pattern": null
          },
          "number": {
            "type": "string",
            "nullable": true,
            "maxLength": 11,
            "description": "Номер"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentOwnerSchema": {
        "type": "object",
        "properties": {
          "f": {
            "readOnly": true,
            "type": "string",
            "example": "zag"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentListSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "$ref": "#/components/schemas/DocumentOwnerSchema"
          },
          "edo_signed": {
            "type": "boolean"
          },
          "total": {
            "type": "number",
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "city": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true
              }
            }
          },
          "carrier": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "maxLength": 250,
            "description": "Комментарий"
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "description": "ВесДокумента"
          },
          "address": {
            "type": "string",
            "nullable": true,
            "maxLength": 250,
            "description": "Адрес"
          },
          "document_type": {
            "type": "string",
            "nullable": true,
            "maxLength": 4,
            "description": "Ссылка"
          },
          "document_uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Ссылка"
          },
          "carrier_warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адрес"
              },
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата",
            "pattern": null
          },
          "places": {
            "type": "integer",
            "nullable": true,
            "description": "КоличествоМест"
          },
          "document_url": {},
          "number": {
            "type": "string",
            "nullable": true,
            "maxLength": 11,
            "description": "Номер"
          },
          "document_name": {
            "type": "string"
          },
          "carrier_number": {
            "type": "string",
            "nullable": true,
            "description": "НомерДокументаПеревозчика"
          }
        },
        "required": [
          "document_uuid"
        ]
      },
      "DocumentTypesSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DocumentsCheckSignResponseSchema": {
        "type": "object",
        "properties": {
          "edo_signed": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "DocumentsDatePeriodSchema": {
        "type": "object",
        "properties": {
          "end": {
            "type": "string",
            "example": "2026-08-14T23:59:59Z"
          },
          "order": {
            "type": "integer",
            "example": 0
          },
          "key": {
            "type": "string",
            "example": "today"
          },
          "start": {
            "type": "string",
            "example": "2026-08-14T00:00:00Z"
          },
          "name": {
            "type": "string",
            "example": "Сьогодні"
          }
        }
      },
      "DocumentsDecodeBarcodeResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DocumentsEdoStatusItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Підписані"
          },
          "key": {
            "type": "string",
            "example": "signed"
          }
        }
      },
      "DocumentsEdoStatusesResponseSchema": {
        "type": "object",
        "properties": {
          "edo_statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsEdoStatusItemSchema"
            }
          }
        }
      },
      "DocumentsGroupedResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "object",
            "description": "Документи, згруповані за датою"
          }
        }
      },
      "DocumentsListResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentListSchema"
            }
          }
        }
      },
      "DocumentsReclamationProductItemSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "article": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentsReclamationProductsInnerSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsReclamationProductItemSchema"
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DocumentsReclamationProductsResponseSchema": {
        "type": "object",
        "properties": {
          "reclamation_products": {
            "$ref": "#/components/schemas/DocumentsReclamationProductsInnerSchema"
          }
        }
      },
      "DocumentsSalesCarrierSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentsSalesDeliveryConfigSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "DocumentsSalesTtnStatusSchema": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DocumentsSalesProductBrandSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentsSalesProductInfoSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentsSalesProductBrandSchema"
              }
            ]
          },
          "name_for_invoice": {
            "type": "string",
            "nullable": true
          },
          "article": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DocumentsSalesUctZedSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "is_imported": {
            "type": "boolean",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          }
        }
      },
      "DocumentsSalesProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/DocumentsSalesProductInfoSchema"
          },
          "total": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "uct_zed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsSalesUctZedSchema"
            }
          },
          "quantity": {
            "type": "number"
          }
        }
      },
      "DocumentsSaleWithProductsSchema": {
        "type": "object",
        "properties": {
          "currency": {
            "nullable": true,
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "total": {
            "type": "number",
            "nullable": true
          },
          "created_at": {
            "type": "string"
          },
          "carrier": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentsSalesCarrierSchema"
              }
            ]
          },
          "delivery_config": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentsSalesDeliveryConfigSchema"
              }
            ]
          },
          "ttn_status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentsSalesTtnStatusSchema"
              }
            ]
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "document_uuid": {
            "type": "string"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsSalesProductSchema"
            }
          }
        }
      },
      "DocumentsSalesByOrderInfoSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "processed": {
            "type": "boolean"
          },
          "number": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentsSalesByOrderItemSchema": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "DocumentsSalesByOrderResponseSchema": {
        "type": "object",
        "properties": {
          "order": {
            "$ref": "#/components/schemas/DocumentsSalesByOrderInfoSchema"
          },
          "sales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsSalesByOrderItemSchema"
            }
          }
        }
      },
      "DocumentsSalesWithProductsResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsSaleWithProductsSchema"
            }
          }
        }
      },
      "DocumentsSignResponseSchema": {
        "type": "object",
        "properties": {
          "vchasno_url": {
            "type": "string",
            "example": "https://vchasno.ua/sign/..."
          }
        }
      },
      "DocumentsTypeGroupSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "sales"
          },
          "name": {
            "type": "string",
            "example": "Закупівлі"
          },
          "edo_filter": {
            "type": "boolean",
            "example": true
          },
          "types": {
            "type": "array",
            "example": [
              "0000013C"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DocumentsTypeGroupsResponseSchema": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentsTypeGroupSchema"
            }
          }
        }
      },
      "DocumentsTypesResponseSchema": {
        "type": "object",
        "properties": {
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTypesSchema"
            }
          }
        }
      },
      "IncomingPaymentDocumentSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "total": {
            "type": "number",
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "description": "Комментарий"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "currency_sum": {
            "type": "number"
          },
          "contract": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "csv": {
            "type": "boolean"
          },
          "currency_rate": {
            "type": "object",
            "properties": {
              "currency_rate": {
                "type": "number",
                "nullable": true,
                "description": "КурсВзаиморасчетов"
              }
            }
          },
          "excel": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "PaymentDocumentSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "total": {
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "comment": {
            "nullable": true,
            "description": "Комментарий"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "currency_sum": {
            "type": "number"
          },
          "check_link": {
            "readOnly": true
          },
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "csv": {
            "type": "boolean"
          },
          "currency_rate": {
            "type": "object",
            "properties": {
              "currency_rate": {
                "nullable": true,
                "description": "КурсВзаиморасчетов"
              }
            }
          },
          "excel": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "RestrictedDeliverySchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProductionServicesOrderActServicesSchema": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number"
          },
          "service": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "quantity": {
            "type": "integer",
            "nullable": true,
            "description": "Количество"
          },
          "total": {
            "type": "number"
          }
        }
      },
      "ReclamationDocumentSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "responsible_uuid": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "Ответственный"
          },
          "defect_description": {
            "type": "string",
            "nullable": true,
            "description": "ОписаниеНеисправности"
          },
          "car_engine": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "Двигатель"
          },
          "car_model": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "МодельАвтомобиля"
          },
          "odometer_end": {
            "type": "number",
            "nullable": true,
            "description": "ОдометрНаКонец"
          },
          "partner_address": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "АдресОрганизации"
          },
          "partner_name": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "НаименованиеОрганизации"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "excel": {
            "type": "boolean"
          },
          "document_name": {
            "type": "string"
          },
          "car_code": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "КодКузова"
          },
          "disassembling_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаДемонтажа",
            "pattern": null
          },
          "product": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "unit_uuid": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "Подразделение"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "description": "Комментарий"
          },
          "quantity": {
            "type": "number",
            "nullable": true,
            "description": "Количество"
          },
          "diagnostic_equipment": {
            "type": "string",
            "nullable": true,
            "maxLength": 500,
            "description": "ДиагностическоеОборудование"
          },
          "organization_uuid": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "Организация"
          },
          "partner_unit": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "СотрудникОрганизации"
          },
          "partner_phone": {
            "type": "string",
            "nullable": true,
            "maxLength": 20,
            "description": "ТелефонОрганизации"
          },
          "installation_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаУстановки",
            "pattern": null
          },
          "prod_year": {
            "type": "string",
            "nullable": true,
            "maxLength": 4,
            "description": "ГодВыпуска"
          },
          "defect_cause": {
            "type": "string",
            "nullable": true,
            "description": "ПредполагаемаяПричинаНеисправности"
          },
          "odometer_start": {
            "type": "number",
            "nullable": true,
            "description": "ОдометрНаНачало"
          },
          "reject_cause": {
            "type": "string",
            "nullable": true,
            "description": "ПричинаОтказа"
          },
          "photo_or_video": {
            "type": "boolean",
            "nullable": true,
            "description": "ЕстьФотоВидео"
          },
          "client": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "defect_detection_case": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "ОбстоятельствоОбнаруженияНеисправности"
          },
          "car_brand": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "МаркаАвтомобиля"
          },
          "pdf_url": {},
          "car_number": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "ГосНомерАвтомобиля"
          },
          "csv": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "RefundRequestDocumentProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "properties": {
              "brand": {
                "$ref": "#/components/schemas/BrandNestedSchema"
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "default_image": {
                "readOnly": true,
                "description": "URL зображення товару",
                "example": "https://cdn.bm.parts/photos/oc47.jpg"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "ratio": {
            "type": "number",
            "description": "Коэффициент"
          },
          "state_string": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "description": "Количество"
          },
          "state_uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Состояние"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "quantity",
          "ratio",
          "state_uuid",
          "uuid"
        ]
      },
      "RefundRequestDocumentSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "csv_url": {},
          "state_string": {
            "type": "string"
          },
          "csv": {
            "type": "boolean"
          },
          "comment": {
            "type": "string",
            "description": "Комментарий"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "pdf_url": {},
          "excel_url": {},
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "state_uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Состояние"
          },
          "excel": {
            "type": "boolean"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RefundRequestDocumentProductSchema"
            }
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "comment",
          "state_uuid",
          "uuid"
        ]
      },
      "ReturnDocumentProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "properties": {
              "brand": {
                "$ref": "#/components/schemas/BrandNestedSchema"
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "default_image": {
                "readOnly": true,
                "description": "URL зображення товару",
                "example": "https://cdn.bm.parts/photos/oc47.jpg"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "auto_discount": {
            "nullable": true,
            "description": "ПроцентАвтоматическихСкидок"
          },
          "total": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "discount": {
            "nullable": true,
            "description": "ПроцентСкидкиНаценки"
          },
          "quantity": {
            "nullable": true,
            "description": "Количество"
          },
          "line_num": {
            "nullable": true,
            "description": "НомерСтроки"
          }
        }
      },
      "ReturnDocumentDetailSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "deal_uuid": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "Сделка"
          },
          "total": {
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адреса"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "nullable": true,
            "description": "Комментарий"
          },
          "currency_rate": {
            "nullable": true,
            "description": "КурсВзаиморасчетов"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnDocumentProductSchema"
            }
          },
          "csv_url": {},
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "marked": {
            "type": "boolean",
            "nullable": true,
            "description": "ПометкаУдаления"
          },
          "pdf_url": {},
          "excel_url": {},
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "document_name": {
            "type": "string"
          },
          "price_type_uuid": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "ТипЦен"
          },
          "csv": {
            "type": "boolean"
          },
          "excel": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "SaleDocumentDetailSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "shipped_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаРейса",
            "pattern": null
          },
          "ttn_documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "warehouse": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "uuid": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Уникальный идентификатор"
                    }
                  },
                  "required": [
                    "uuid"
                  ]
                },
                "city": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "nullable": true
                    },
                    "region": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "nullable": true
                        }
                      }
                    }
                  }
                },
                "carrier": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "uuid": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Уникальный идентификатор"
                    }
                  },
                  "required": [
                    "uuid"
                  ]
                },
                "document_url": {},
                "number": {
                  "nullable": true,
                  "description": "Номер документа"
                },
                "type": {
                  "type": "string"
                },
                "document_name": {
                  "type": "string"
                },
                "uuid": {
                  "type": "string",
                  "maxLength": 16
                }
              },
              "required": [
                "uuid"
              ]
            }
          },
          "currency_rate": {
            "nullable": true,
            "description": "КурсВзаиморасчетов"
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "$ref": "#/components/schemas/BrandNestedSchema"
                    },
                    "article": {
                      "nullable": true,
                      "description": "Артикул"
                    },
                    "name_for_invoice": {
                      "nullable": true,
                      "description": "ТекстДляПечатиВНалоговойНакладной"
                    },
                    "uuid": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "name": {
                      "type": "string"
                    },
                    "default_image": {
                      "readOnly": true,
                      "description": "URL зображення товару",
                      "example": "https://cdn.bm.parts/photos/oc47.jpg"
                    }
                  },
                  "required": [
                    "uuid"
                  ]
                },
                "total": {
                  "type": "number"
                },
                "price": {
                  "type": "number"
                },
                "uct_zed": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "uct_zed": {
                        "type": "object",
                        "properties": {
                          "is_imported": {
                            "type": "boolean"
                          }
                        }
                      },
                      "code": {
                        "type": "string"
                      },
                      "quantity": {
                        "description": "Количество"
                      }
                    },
                    "required": [
                      "quantity"
                    ]
                  }
                },
                "discount": {
                  "nullable": true,
                  "description": "ПроцентСкидкиНаценки"
                },
                "quantity": {
                  "nullable": true,
                  "description": "Количество"
                },
                "line_num": {
                  "nullable": true,
                  "description": "НомерСтроки"
                }
              }
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "marked": {
            "type": "boolean",
            "nullable": true,
            "description": "ПометкаУдаления"
          },
          "excel_url": {},
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "transmission_type": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "ВидПередачи"
          },
          "acts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "document_url": {},
                "number": {
                  "type": "string"
                },
                "assembly_location": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": null,
                  "pattern": null
                },
                "document_name": {
                  "type": "string"
                },
                "uuid": {
                  "type": "string"
                }
              }
            }
          },
          "excel": {
            "type": "boolean"
          },
          "document_name": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адреса"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "nullable": true,
            "description": "Комментарий"
          },
          "delivery_config": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "weight": {
            "nullable": true,
            "description": "ВесДокумента"
          },
          "csv_url": {},
          "pdf_url": {},
          "document_url": {},
          "csv": {
            "type": "boolean"
          },
          "invoice_pdf": {},
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ServiceActDocumentSchema": {
        "type": "object",
        "properties": {
          "owner": {},
          "pdf": {
            "type": "boolean"
          },
          "sale_documents": {
            "readOnly": true
          },
          "ttn_documents": {
            "readOnly": true
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "assembly_location": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "pattern": null
          },
          "number": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "excel": {
            "type": "boolean"
          },
          "document_name": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "comment": {
            "type": "string"
          },
          "client": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionServicesOrderActServicesSchema"
            }
          },
          "document_url": {},
          "pdf_url": {},
          "csv": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "TTNDocumentDetailSchema": {
        "type": "object",
        "properties": {
          "pdf": {
            "type": "boolean"
          },
          "owner": {
            "type": "object"
          },
          "expense_document_type": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "РасходныйДокументТип"
          },
          "city": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true
              },
              "region": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true
                  }
                }
              }
            }
          },
          "return_money": {
            "type": "boolean",
            "nullable": true,
            "description": "ОбратнаяДоставка"
          },
          "sale_documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "shipped_at": {
                  "type": "string",
                  "format": null,
                  "nullable": true,
                  "description": "ДатаРейса",
                  "pattern": null
                },
                "currency": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "nullable": true,
                      "description": "Наименование"
                    }
                  }
                },
                "warehouse": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "uuid": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Уникальный идентификатор"
                    }
                  },
                  "required": [
                    "uuid"
                  ]
                },
                "document_url": {},
                "number": {
                  "nullable": true,
                  "description": "Номер документа"
                },
                "type": {
                  "type": "string"
                },
                "document_name": {
                  "type": "string"
                },
                "uuid": {
                  "type": "string",
                  "maxLength": 16
                }
              },
              "required": [
                "uuid"
              ]
            }
          },
          "receiver": {
            "type": "object",
            "properties": {
              "full_name": {
                "nullable": true,
                "description": "Наименование"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            }
          },
          "address": {
            "nullable": true,
            "description": "Адрес"
          },
          "carrier_warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адрес"
              },
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "name": {
                "nullable": true,
                "description": "Наименование"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "places": {
            "nullable": true,
            "description": "КоличествоМест"
          },
          "marked": {
            "type": "boolean",
            "nullable": true,
            "description": "Помітка на видалення"
          },
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "type": {
            "type": "string"
          },
          "excel": {
            "type": "boolean"
          },
          "document_name": {
            "type": "string"
          },
          "carrier_number": {
            "nullable": true,
            "description": "НомерДокументаПеревозчика"
          },
          "notes": {
            "nullable": true,
            "description": "Примечания"
          },
          "total": {
            "nullable": true,
            "description": "СуммаДокумента"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "address": {
                "nullable": true,
                "description": "Адреса"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "carrier": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "nullable": true,
            "description": "КомментарийДляКлиента"
          },
          "departure_date": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаРейса",
            "pattern": null
          },
          "weight": {
            "nullable": true,
            "description": "Вес"
          },
          "uklon_order_id": {
            "nullable": true,
            "description": "ID замовлення Uklon Delivery"
          },
          "document_url": {},
          "return_money_total": {
            "nullable": true,
            "description": "ОбратнаяДоставкаСумма"
          },
          "csv": {
            "type": "boolean"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Текст помилки",
            "example": "Ресурс не знайдено"
          },
          "documentation_url": {
            "type": "string",
            "description": "Посилання на документацію API",
            "example": "https://developer.bm.parts/"
          }
        },
        "required": [
          "documentation_url",
          "message"
        ]
      },
      "ValidationErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Текст помилки",
            "example": "Ресурс не знайдено"
          },
          "documentation_url": {
            "type": "string",
            "description": "Посилання на документацію API",
            "example": "https://developer.bm.parts/"
          },
          "errors": {
            "type": "object",
            "description": "Помилки валідації полів форми",
            "example": {
              "quantity": [
                "Обов'язкове поле"
              ]
            },
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "documentation_url",
          "message"
        ]
      },
      "FinanceContractDetailInfoSchema": {
        "type": "object",
        "properties": {
          "allowed_days": {
            "type": "integer",
            "example": 14
          },
          "exceeded_sum": {
            "type": "number",
            "example": 0
          },
          "control_days": {
            "type": "boolean",
            "example": true
          },
          "available_days": {
            "type": "integer",
            "example": 10
          },
          "control_sum": {
            "type": "boolean",
            "example": true
          },
          "name": {
            "type": "string",
            "example": "Основний договір"
          },
          "exceeded_days": {
            "type": "integer",
            "example": 0
          },
          "allowed_sum": {
            "type": "number",
            "example": 100000.0
          },
          "available_sum": {
            "type": "number",
            "example": 84769.5
          },
          "uuid": {
            "type": "string"
          }
        },
        "required": [
          "allowed_days",
          "allowed_sum",
          "control_days",
          "control_sum",
          "name",
          "uuid"
        ]
      },
      "FinancePaymentTermSchema": {
        "type": "object",
        "properties": {
          "balance_cumulative": {
            "type": "number",
            "example": 1200.0
          },
          "balance": {
            "type": "number",
            "example": 1200.0
          },
          "payment_day": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "balance",
          "balance_cumulative",
          "payment_day"
        ]
      },
      "FinanceShipmentSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": ""
          },
          "processing_possible": {
            "type": "boolean",
            "nullable": true,
            "example": true
          },
          "error": {
            "type": "boolean",
            "example": false
          },
          "allowed": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "allowed",
          "error",
          "message"
        ]
      },
      "FinanceCreditSchema": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "UAH"
          },
          "total": {
            "type": "number",
            "example": 15230.5
          },
          "client_total": {
            "type": "number",
            "example": 15230.5
          }
        },
        "required": [
          "client_total",
          "currency",
          "total"
        ]
      },
      "FinanceContractDetailResponseSchema": {
        "type": "object",
        "properties": {
          "payment_terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinancePaymentTermSchema"
            }
          },
          "info": {
            "$ref": "#/components/schemas/FinanceContractDetailInfoSchema"
          },
          "shipment": {
            "$ref": "#/components/schemas/FinanceShipmentSchema"
          },
          "credit": {
            "$ref": "#/components/schemas/FinanceCreditSchema"
          }
        },
        "required": [
          "credit",
          "info",
          "payment_terms",
          "shipment"
        ]
      },
      "FinanceContractItemSchema": {
        "type": "object",
        "properties": {
          "allowed_days": {
            "type": "integer",
            "example": 14
          },
          "total": {
            "type": "number",
            "example": 15230.5
          },
          "code": {
            "type": "string",
            "example": "00001234"
          },
          "name": {
            "type": "string",
            "example": "Основний договір"
          },
          "allowed_sum": {
            "type": "number",
            "example": 100000.0
          },
          "uuid": {
            "type": "string",
            "example": "BBE4000C2947F7AE11E2C0B59886A6B0"
          }
        },
        "required": [
          "allowed_days",
          "allowed_sum",
          "code",
          "name",
          "total",
          "uuid"
        ]
      },
      "FinanceContractListResponseSchema": {
        "type": "object",
        "properties": {
          "contracts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceContractItemSchema"
            }
          }
        },
        "required": [
          "contracts"
        ]
      },
      "FinanceCurrencyItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "USD"
          },
          "uuid": {
            "type": "string",
            "example": "A358000C2947F7AE11E23F5617780B17"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "FinanceCurrencyListResponseSchema": {
        "type": "object",
        "properties": {
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceCurrencyItemSchema"
            }
          }
        },
        "required": [
          "currencies"
        ]
      },
      "FinanceRateItemSchema": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "integer",
            "example": 1
          },
          "currency_name": {
            "type": "string",
            "example": "USD"
          },
          "rate": {
            "type": "number",
            "example": 41.25
          }
        },
        "required": [
          "currency_name",
          "priority",
          "rate"
        ]
      },
      "FinanceCurrencyRatesResponseSchema": {
        "type": "object",
        "properties": {
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceRateItemSchema"
            }
          }
        },
        "required": [
          "rates"
        ]
      },
      "FinanceHistoryRateItemSchema": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "example": 41.25
          },
          "period": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "period",
          "rate"
        ]
      },
      "FinanceHistoryRatesResponseSchema": {
        "type": "object",
        "properties": {
          "history_rates": {
            "type": "object",
            "description": "Історія курсів за кодом валюти (USD, EUR)",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FinanceHistoryRateItemSchema"
              }
            }
          }
        },
        "required": [
          "history_rates"
        ]
      },
      "FinancePaymentLinkResponseSchema": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "description": "URL сторінки оплати Privat24",
            "example": "https://www.privat24.ua/rd2/my_payments_create/abc"
          }
        },
        "required": [
          "link"
        ]
      },
      "GarageCarSchema": {
        "type": "object",
        "properties": {
          "gov_number": {
            "type": "string",
            "nullable": true,
            "example": "AA1234BB"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "car": {
            "type": "string",
            "example": "VOLVO, XC60"
          },
          "vin_code": {
            "type": "string",
            "example": "YV1FW7381E1201989"
          },
          "name": {
            "type": "string",
            "example": "Автомобіль 1"
          },
          "uuid": {
            "type": "string",
            "example": "A1B2C3D4E5F64789A0B1C2D3E4F50617"
          }
        },
        "required": [
          "car",
          "created_at",
          "name",
          "uuid",
          "vin_code"
        ]
      },
      "GarageCarResponseSchema": {
        "type": "object",
        "properties": {
          "car": {
            "$ref": "#/components/schemas/GarageCarSchema"
          }
        },
        "required": [
          "car"
        ]
      },
      "GarageCarSchema2": {
        "type": "object",
        "properties": {
          "gov_number": {
            "type": "string",
            "nullable": true,
            "example": "AA1234BB"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "car": {
            "type": "string",
            "example": "VOLVO, XC60"
          },
          "vin_code": {
            "type": "string",
            "example": "YV1FW7381E1201989"
          },
          "name": {
            "type": "string",
            "example": "Автомобіль 1"
          },
          "uuid": {
            "type": "string",
            "example": "A1B2C3D4E5F64789A0B1C2D3E4F50617"
          }
        },
        "required": [
          "car",
          "created_at",
          "name",
          "uuid",
          "vin_code"
        ]
      },
      "GarageCarsResponseSchema": {
        "type": "object",
        "properties": {
          "cars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GarageCarSchema2"
            }
          },
          "count": {
            "type": "integer",
            "example": 1
          }
        },
        "required": [
          "cars",
          "count"
        ]
      },
      "GarageCreateCarResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "Текст помилки, якщо result=false"
          },
          "car": {
            "$ref": "#/components/schemas/GarageCarSchema2"
          }
        },
        "required": [
          "result"
        ]
      },
      "GarageResultResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "result"
        ]
      },
      "ListsBarcodeItemSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "nullable": true,
            "description": "Назва бренду",
            "example": "BOSCH"
          },
          "barcodes": {
            "type": "array",
            "nullable": true,
            "description": "Список штрих-кодів",
            "example": [
              "4052568228341"
            ],
            "items": {
              "type": "string"
            }
          },
          "article": {
            "type": "string",
            "nullable": true,
            "description": "Артикул",
            "example": "OC47"
          },
          "uuid": {
            "type": "string",
            "description": "UUID товару",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ListsBarcodesResponseSchema": {
        "type": "object",
        "properties": {
          "response": {
            "type": "array",
            "description": "Список товарів зі штрих-кодами",
            "items": {
              "$ref": "#/components/schemas/ListsBarcodeItemSchema"
            }
          }
        },
        "required": [
          "response"
        ]
      },
      "ListsPhotosLinkRequestSchema": {
        "type": "object",
        "properties": {
          "brands": {
            "type": "array",
            "description": "Назви брендів товарів (опціонально)",
            "example": [
              "LuK",
              "SOLGY"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "NewsGalleryItemSchema": {
        "type": "object",
        "properties": {
          "resource_url": {
            "type": "string",
            "description": "URL зображення або відео",
            "example": "https://cdn.bm.parts/news/gallery/1.jpg"
          },
          "is_video": {
            "type": "boolean",
            "description": "Ознака відео",
            "example": false
          }
        },
        "required": [
          "is_video",
          "resource_url"
        ]
      },
      "NewsDetailResponseSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Короткий опис",
            "example": "Короткий опис новини"
          },
          "image_url": {
            "type": "string",
            "description": "URL зображення",
            "example": "https://cdn.bm.parts/news/cover.jpg"
          },
          "body": {
            "type": "string",
            "description": "Повний текст новини",
            "example": "<p>Текст новини</p>"
          },
          "published_at": {
            "type": "string",
            "description": "Дата публікації",
            "example": "2026-08-01T12:00:00Z"
          },
          "has_en": {
            "type": "boolean",
            "description": "Є англійська версія",
            "example": true
          },
          "gallery": {
            "type": "array",
            "description": "Галерея зображень і відео",
            "items": {
              "$ref": "#/components/schemas/NewsGalleryItemSchema"
            }
          },
          "name": {
            "type": "string",
            "description": "Заголовок",
            "example": "Нова акція BM Parts"
          },
          "uuid": {
            "type": "string",
            "description": "UUID новини",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "body",
          "description",
          "gallery",
          "has_en",
          "image_url",
          "name",
          "published_at",
          "uuid"
        ]
      },
      "NewsListItemSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Короткий опис",
            "example": "Короткий опис новини"
          },
          "image_url": {
            "type": "string",
            "description": "URL зображення",
            "example": "https://cdn.bm.parts/news/cover.jpg"
          },
          "published_at": {
            "type": "string",
            "description": "Дата публікації",
            "example": "2026-08-01T12:00:00Z"
          },
          "has_en": {
            "type": "boolean",
            "description": "Є англійська версія",
            "example": true
          },
          "name": {
            "type": "string",
            "description": "Заголовок",
            "example": "Нова акція BM Parts"
          },
          "uuid": {
            "type": "string",
            "description": "UUID новини",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "description",
          "has_en",
          "image_url",
          "name",
          "published_at",
          "uuid"
        ]
      },
      "NewsListResponseSchema": {
        "type": "object",
        "properties": {
          "news": {
            "description": "Список новин",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewsListItemSchema"
            }
          }
        },
        "required": [
          "news"
        ]
      },
      "PriceListWaitingSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Очікується"
          },
          "quantity": {
            "type": "string",
            "nullable": true,
            "example": "4"
          },
          "uuid": {
            "type": "string",
            "example": "-"
          }
        }
      },
      "PriceListStockItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Київ"
          },
          "quantity": {
            "type": "string",
            "nullable": true,
            "example": "12"
          },
          "uuid": {
            "type": "string",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        }
      },
      "PriceListJsonItemSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "nullable": true,
            "example": "BOSCH"
          },
          "in_waiting": {
            "nullable": true,
            "description": "Лише якщо in_waiting=true",
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceListWaitingSchema"
              }
            ]
          },
          "price": {
            "type": "string",
            "nullable": true,
            "example": "325.50"
          },
          "node": {
            "type": "string",
            "nullable": true,
            "description": "UUID вузла, лише якщо show_node_uuid=true"
          },
          "multiplicity": {
            "type": "string",
            "nullable": true,
            "description": "Лише якщо multiplicity=true",
            "example": "1"
          },
          "article": {
            "type": "string",
            "nullable": true,
            "example": "OC47"
          },
          "in_stocks": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PriceListStockItemSchema"
            }
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Оливний фільтр"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "PriceListRequestSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "array",
            "description": "Назва бренду або список брендів",
            "example": [
              "BOSCH"
            ],
            "items": {
              "type": "string"
            }
          },
          "format": {
            "type": "string",
            "default": "csv",
            "description": "Формат виводу (csv або json)",
            "example": "csv"
          },
          "warehouses": {
            "type": "array",
            "description": "Масив UUID складів",
            "example": [
              "81F4005056AC66D611EAD7173350C7AA"
            ],
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "type": "string",
            "description": "UUID валюти",
            "example": "A358000C2947F7AE11E23F5617780B16"
          },
          "in_waiting": {
            "type": "boolean",
            "default": false,
            "description": "Виводити колонку Очікується",
            "example": false
          },
          "multiplicity": {
            "type": "boolean",
            "default": false,
            "description": "Виводити колонку Кратність",
            "example": false
          },
          "nodes": {
            "type": "array",
            "description": "Список UUID категорій/вузлів",
            "items": {
              "type": "string"
            }
          },
          "no_discounts": {
            "type": "boolean",
            "default": false,
            "description": "Не враховувати знижки клієнта",
            "example": false
          },
          "car_brand": {
            "type": "array",
            "description": "Марка авто або список марок",
            "example": [
              "BMW"
            ],
            "items": {
              "type": "string"
            }
          },
          "show_node_uuid": {
            "type": "boolean",
            "default": false,
            "description": "Виводити UUID вузлів у прайсі",
            "example": false
          },
          "full_product_name": {
            "type": "boolean",
            "default": true,
            "description": "Повна або скорочена назва",
            "example": true
          },
          "products_type": {
            "type": "string",
            "default": "uuid",
            "description": "Тип ідентифікаторів у products (UUID або code)",
            "example": "uuid"
          },
          "id_type": {
            "type": "string",
            "description": "Тип ідентифікатора в першій колонці CSV (UUID або code)",
            "example": "uuid"
          },
          "products": {
            "type": "array",
            "description": "Масив товарів (UUID або code)",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PromPriceListRequestSchema": {
        "type": "object",
        "properties": {
          "with_extra": {
            "type": "boolean",
            "default": false,
            "description": "Застосувати націнки поточного логіна з налаштувань B2B",
            "example": true
          },
          "warehouses": {
            "type": "array",
            "description": "Масив UUID складів",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "type": "string",
            "description": "UUID валюти"
          },
          "full_product_name": {
            "type": "boolean",
            "description": "Повна назва",
            "example": true
          }
        }
      },
      "CanceledOrderSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "canceled": {
            "type": "boolean"
          },
          "number": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProcessingAsyncResponseSchema": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        },
        "required": [
          "task_id"
        ]
      },
      "ProcessingCancelOrdersResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "orders": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanceledOrderSchema"
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProcessingChangeDeliveryResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProcessingChangedPriceItemSchema": {
        "type": "object",
        "properties": {
          "price_new": {
            "type": "number"
          },
          "code": {
            "type": "string"
          },
          "price_old": {
            "type": "number"
          },
          "article": {
            "type": "string"
          },
          "brand_code": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProcessingDepartureAdditionalSchema": {
        "type": "object",
        "properties": {
          "is_fastest": {
            "type": "boolean",
            "example": true
          },
          "is_recommended": {
            "type": "boolean",
            "example": false
          },
          "delay_days": {
            "type": "integer",
            "example": 0
          },
          "text": {
            "type": "string",
            "nullable": true,
            "example": "Експрес-самовивіз"
          },
          "departure_start": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-14T14:00:00Z"
          },
          "departure_end": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProcessingDepartureItemSchema": {
        "type": "object",
        "properties": {
          "route_code": {
            "type": "string",
            "example": "R001"
          },
          "expired_at": {
            "type": "string",
            "example": "2026-08-14T10:00:00Z"
          },
          "route_at": {
            "type": "string",
            "example": "2026-08-14T08:00:00Z"
          },
          "additional": {
            "nullable": true,
            "description": "Додаткові атрибути рейсу з 1С",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingDepartureAdditionalSchema"
              }
            ]
          },
          "is_working_time": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "example": "KEY123"
          },
          "departure_at": {
            "type": "string",
            "example": "2026-08-14T12:00:00Z"
          },
          "name": {
            "type": "string",
            "example": "Київ ранок"
          },
          "uuid": {
            "type": "string",
            "example": "KEY123 2026-08-14T08:00:00Z"
          }
        }
      },
      "ProcessingDeparturesResponseSchema": {
        "type": "object",
        "properties": {
          "departures": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessingDepartureItemSchema"
            }
          }
        }
      },
      "ProcessingDocumentSchema": {
        "type": "object",
        "properties": {
          "sum": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "document_type": {
            "type": "string",
            "nullable": true
          },
          "warehouse_address": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProcessingOrderSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "object",
            "nullable": true
          },
          "route_code": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "total": {
            "type": "number",
            "nullable": true
          },
          "delivery_date": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "warehouse": {
            "type": "object",
            "nullable": true
          },
          "delivery_config": {
            "type": "object",
            "nullable": true
          },
          "processed": {
            "type": "boolean",
            "nullable": true
          },
          "date": {
            "type": "string"
          },
          "route_date": {
            "type": "string",
            "nullable": true
          },
          "shipping_date": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProcessingEditOrderResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "order_canceled": {
            "type": "boolean",
            "example": false
          },
          "order": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingOrderSchema"
              }
            ]
          }
        }
      },
      "ProcessingNearestDepartureItemSchema": {
        "type": "object",
        "properties": {
          "route_code": {
            "type": "string",
            "example": "R001"
          },
          "receipt_at": {
            "type": "string",
            "nullable": true,
            "example": "2026-08-15T09:00:00Z"
          },
          "expired_at": {
            "type": "string",
            "example": "2026-08-14T10:00:00Z"
          },
          "route_at": {
            "type": "string",
            "example": "2026-08-14T08:00:00Z"
          },
          "additional": {
            "nullable": true,
            "description": "Додаткові атрибути рейсу з 1С",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingDepartureAdditionalSchema"
              }
            ]
          },
          "is_working_time": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "example": "KEY123"
          },
          "departure_at": {
            "type": "string",
            "example": "2026-08-14T12:00:00Z"
          },
          "name": {
            "type": "string",
            "example": "Київ ранок"
          },
          "uuid": {
            "type": "string",
            "example": "KEY123 2026-08-14T08:00:00Z"
          }
        }
      },
      "ProcessingNearestDepartureResponseSchema": {
        "type": "object",
        "properties": {
          "departure": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingNearestDepartureItemSchema"
              }
            ]
          }
        }
      },
      "ProcessingPreCheckResponseSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Відвантаження дозволено."
          },
          "error": {
            "type": "boolean",
            "example": false
          },
          "allowed": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "allowed",
          "error",
          "message"
        ]
      },
      "ProcessingReportItemSchema": {
        "type": "object",
        "properties": {
          "reserve": {
            "type": "integer"
          },
          "planned": {
            "type": "integer"
          },
          "shipped": {
            "type": "integer"
          },
          "ordered": {
            "type": "integer"
          },
          "article": {
            "type": "string"
          },
          "brand_code": {
            "type": "integer"
          },
          "left_until": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProcessingReserveProcessResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "delivery_config": {
            "type": "object",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "document": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingDocumentSchema"
              }
            ]
          }
        },
        "required": [
          "result"
        ]
      },
      "ProcessingSyncResponseSchema": {
        "type": "object",
        "properties": {
          "download_unshipped": {
            "type": "string",
            "nullable": true
          },
          "processing_report": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessingReportItemSchema"
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "delivery_config": {
            "type": "object",
            "nullable": true
          },
          "document": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingDocumentSchema"
              }
            ]
          },
          "changed_prices": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessingChangedPriceItemSchema"
            }
          },
          "temp_cart_uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID тимчасового кошика. З'являється лише при частковій обробці (partial_processing)"
          },
          "saved_unshipped": {
            "type": "object",
            "nullable": true
          },
          "result": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "result"
        ]
      },
      "ProcessingShipmentTaskResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProcessingSyncResponseSchema"
              }
            ]
          },
          "state": {
            "type": "string",
            "example": "SUCCESS"
          }
        }
      },
      "ProcessingValidationErrorSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "documentation_url": {
            "type": "string"
          },
          "success": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "ProductCurrencyPriceSchema": {
        "type": "object",
        "properties": {
          "price": {
            "type": "string",
            "description": "Ціна як рядок із двома десятковими знаками",
            "example": "325.50"
          },
          "currency_name": {
            "type": "string",
            "example": "UAH"
          }
        },
        "required": [
          "currency_name",
          "price"
        ]
      },
      "ProductStockItemSchema": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean",
            "nullable": true,
            "description": "Основний склад клієнта",
            "example": true
          },
          "labels": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "contract_quantities": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "quantity": {
            "type": "string",
            "nullable": true,
            "description": "Кількість (рядок, може бути '>' або '-')",
            "example": "12"
          },
          "short_name": {
            "type": "string",
            "nullable": true
          },
          "has_reserves": {
            "type": "boolean",
            "nullable": true,
            "description": "Є резерви на складі",
            "example": false
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Назва складу",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID складу або типу надходження",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        }
      },
      "ProductItemSchema": {
        "type": "object",
        "properties": {
          "paired_products": {
            "type": "object",
            "nullable": true,
            "description": "Парні товари"
          },
          "multiplicity": {
            "type": "integer",
            "nullable": true,
            "example": 1
          },
          "nodes": {
            "type": "string",
            "nullable": true,
            "description": "Шлях категорій"
          },
          "files": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "badges": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "article": {
            "type": "string",
            "nullable": true,
            "description": "Артикул",
            "example": "OC47"
          },
          "uuid": {
            "type": "string",
            "description": "UUID товару",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "special_offer": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "found_by": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Опис товару"
          },
          "components_of_kit": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "details": {
            "type": "object",
            "nullable": true,
            "description": "Додаткові характеристики"
          },
          "currency_name": {
            "type": "string",
            "nullable": true,
            "example": "UAH"
          },
          "restricted_delivery": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "is_paid_delivery": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "brand": {
            "type": "string",
            "nullable": true,
            "description": "Назва бренду",
            "example": "BOSCH"
          },
          "in_stocks": {
            "type": "array",
            "nullable": true,
            "description": "Залишки за складами",
            "items": {
              "$ref": "#/components/schemas/ProductStockItemSchema"
            }
          },
          "in_waiting": {
            "type": "object",
            "nullable": true,
            "description": "Очікувані надходження"
          },
          "barcodes": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "in_wishlist": {
            "type": "boolean",
            "nullable": true,
            "description": "Товар у списку бажань",
            "example": false
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "example": 0.42
          },
          "analogs": {
            "type": "object",
            "nullable": true,
            "description": "Аналоги"
          },
          "buy_with": {
            "type": "object",
            "nullable": true,
            "description": "З цим товаром купують"
          },
          "promotion": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "new_product": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Назва товару",
            "example": "Оливний фільтр"
          },
          "promos": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "in_cart": {
            "type": "object",
            "nullable": true,
            "description": "Кількість у кошику: {cart_uuid: qty}",
            "example": {
              "A2D9EC97246EEB0B46877CB5803BFD99": 1
            }
          },
          "price": {
            "type": "string",
            "nullable": true,
            "description": "Ціна як рядок із двома десятковими знаками",
            "example": "325.50"
          },
          "tools": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "cars": {
            "type": "array",
            "nullable": true,
            "description": "Застосування",
            "items": {
              "type": "object"
            }
          },
          "images": {
            "type": "array",
            "nullable": true,
            "description": "URL зображень товару",
            "items": {
              "type": "string"
            }
          },
          "in_others": {
            "type": "object",
            "nullable": true,
            "description": "Залишки на інших складах"
          },
          "oe": {
            "type": "array",
            "nullable": true,
            "description": "OE-номери: рядки (oe=short) або об'єкти (oe=full)",
            "items": {}
          },
          "available": {
            "type": "boolean",
            "nullable": true,
            "description": "Чи є товар у наявності",
            "example": true
          },
          "default_image": {
            "type": "string",
            "nullable": true,
            "description": "URL головного зображення"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ProductHeaderSchema": {
        "type": "object",
        "properties": {
          "short_name": {
            "type": "string",
            "nullable": true,
            "description": "Коротка назва складу",
            "example": "Київ"
          },
          "labels": {
            "type": "array",
            "nullable": true,
            "description": "Підписи колонок залишків за договорами",
            "items": {
              "type": "string"
            }
          },
          "is_main": {
            "type": "boolean",
            "nullable": true,
            "description": "Основний склад",
            "example": true
          },
          "warehouse": {
            "type": "string",
            "description": "Назва складу",
            "example": "Київ"
          }
        }
      },
      "ProductDetailResponseSchema": {
        "type": "object",
        "properties": {
          "product": {
            "description": "Картка товару",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProductItemSchema"
              }
            ]
          },
          "headers": {
            "type": "array",
            "nullable": true,
            "description": "Заголовки колонок залишків",
            "items": {
              "$ref": "#/components/schemas/ProductHeaderSchema"
            }
          }
        },
        "required": [
          "product"
        ]
      },
      "ProductExtraSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Тип націнки",
            "example": "brand"
          },
          "value": {
            "type": "number",
            "description": "Значення націнки, %",
            "example": 5.0
          }
        }
      },
      "ProductImagesResponseSchema": {
        "type": "object",
        "properties": {
          "images": {
            "type": "array",
            "nullable": true,
            "description": "Список URL зображень, або null якщо немає",
            "example": [
              "https://cdn.bm.parts/photos/a2/d9/oc47.jpg"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProductInStocksResponseSchema": {
        "type": "object",
        "properties": {
          "in_stocks": {
            "type": "array",
            "description": "Залишки за складами",
            "items": {
              "$ref": "#/components/schemas/ProductStockItemSchema"
            }
          }
        }
      },
      "ProductInWaitingResponseSchema": {
        "type": "object",
        "properties": {
          "in_waiting": {
            "type": "array",
            "description": "Очікувані надходження за типами",
            "items": {
              "$ref": "#/components/schemas/ProductStockItemSchema"
            }
          }
        }
      },
      "ProductPriceResponseSchema": {
        "type": "object",
        "properties": {
          "extra": {
            "nullable": true,
            "description": "Націнка, або null",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProductExtraSchema"
              }
            ]
          },
          "total": {
            "type": "string",
            "description": "Сума = price * qnt",
            "example": "325.50"
          },
          "price": {
            "type": "string",
            "description": "Ціна з націнкою",
            "example": "325.50"
          },
          "total_without_extra": {
            "type": "string",
            "description": "Сума без націнки",
            "example": "310.00"
          },
          "currency_name": {
            "type": "string",
            "description": "Валюта",
            "example": "UAH"
          },
          "price_without_extra": {
            "type": "string",
            "description": "Ціна без націнки",
            "example": "310.00"
          }
        },
        "required": [
          "currency_name",
          "price",
          "price_without_extra",
          "total",
          "total_without_extra"
        ]
      },
      "ProductPricesListResponseSchema": {
        "type": "object",
        "properties": {
          "prices": {
            "type": "array",
            "description": "Ціни в EUR, USD, UAH",
            "items": {
              "$ref": "#/components/schemas/ProductCurrencyPriceSchema"
            }
          }
        },
        "required": [
          "prices"
        ]
      },
      "ProfileBoundClientStatusSchema": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "blocked"
          },
          "value": {
            "type": "string",
            "example": "Заблокований"
          }
        }
      },
      "ProfileBoundClientWarehouseSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        }
      },
      "ProfileBoundClientItemSchema": {
        "type": "object",
        "properties": {
          "main_client": {
            "type": "boolean",
            "example": true
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileBoundClientStatusSchema"
            }
          },
          "blocked": {
            "type": "boolean",
            "example": false
          },
          "contract_uuid": {
            "type": "string",
            "example": "BBE4000C2947F7AE11E2C0B59886A6B0"
          },
          "code": {
            "type": "string",
            "example": "12345678"
          },
          "f": {
            "type": "integer",
            "description": "Тип договору: 0 zag, 1 dag, 2 ghost",
            "example": 0
          },
          "default_warehouse": {
            "$ref": "#/components/schemas/ProfileBoundClientWarehouseSchema"
          },
          "name": {
            "type": "string",
            "example": "ТОВ Автосвіт"
          },
          "sleeping": {
            "type": "boolean",
            "example": false
          },
          "uuid": {
            "type": "string",
            "description": "UUID контрагента (лише для clients_as=arr)"
          }
        }
      },
      "ProfileBoundClientWarehouseSchema2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "example": "81F4005056AC66D611EAD7173350C7AA"
          }
        }
      },
      "ProfileDocsStatusSchema": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true,
            "example": "Верифікований"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "example": "verified"
          }
        }
      },
      "ProfileEdoSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Вчасно"
          }
        }
      },
      "ProfileExtraBrandSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "BOSCH"
          },
          "value": {
            "type": "number",
            "description": "Націнка, %",
            "example": 3
          }
        }
      },
      "ProfileExtraDeleteResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "Присутній, якщо націнку не знайдено"
          }
        },
        "required": [
          "success"
        ]
      },
      "ProfileExtraIntervalSchema": {
        "type": "object",
        "properties": {
          "to": {
            "type": "number",
            "nullable": true,
            "description": "Верхня межа ціни або null (∞)",
            "example": 1000
          },
          "value": {
            "type": "number",
            "description": "Націнка, %",
            "example": 5
          },
          "from": {
            "type": "number",
            "description": "Нижня межа ціни",
            "example": 0
          },
          "uuid": {
            "type": "string",
            "example": "A1B2C3D4E5F64789A0B1C2D3E4F50617"
          }
        }
      },
      "ProfileExtraPreCheckResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "overlap_interval_uuids": {
            "type": "array",
            "description": "UUID інтервалів, що перетинаються (лише interval)",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "ProfileExtraSaveResponseSchema": {
        "type": "object",
        "properties": {
          "extra": {
            "type": "object",
            "description": "Збережена націнка"
          },
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "success"
        ]
      },
      "ProfileMailingItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Прайс-листи"
          },
          "emails": {
            "type": "string",
            "nullable": true,
            "example": "user@mail.ua"
          },
          "uuid": {
            "type": "string",
            "example": "1C920281C72C11E58139000C2999A7E6"
          }
        }
      },
      "ProfileMailingGetResponseSchema": {
        "type": "object",
        "properties": {
          "mailing": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileMailingItemSchema"
            }
          }
        }
      },
      "ProfileMailingPostResponseSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Налаштування розсилки успішно збережено"
          }
        },
        "required": [
          "message"
        ]
      },
      "ProfileServicesSchema": {
        "type": "object",
        "properties": {
          "image_recognition": {
            "type": "boolean",
            "example": false
          },
          "chat": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "ProfileMeResponseSchema": {
        "type": "object",
        "properties": {
          "city_uuid": {
            "type": "string",
            "nullable": true
          },
          "is_main_login": {
            "type": "boolean",
            "example": true
          },
          "bound_clients": {
            "nullable": true
          },
          "docs_status": {
            "$ref": "#/components/schemas/ProfileDocsStatusSchema"
          },
          "contract_uuid": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "main_client": {
            "type": "boolean",
            "example": true
          },
          "currency_name": {
            "type": "string",
            "nullable": true,
            "example": "UAH"
          },
          "code": {
            "type": "string",
            "example": "12345678"
          },
          "warehouse_uuid": {
            "type": "string",
            "nullable": true
          },
          "default_warehouse": {
            "$ref": "#/components/schemas/ProfileBoundClientWarehouseSchema2"
          },
          "warehouse_name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "edo": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProfileEdoSchema"
              }
            ]
          },
          "registration_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "f": {
            "type": "integer",
            "nullable": true,
            "description": "Тип договору (BEZNAL)",
            "example": 0
          },
          "city_name": {
            "type": "string",
            "nullable": true,
            "example": "Київ"
          },
          "name": {
            "type": "string",
            "example": "ТОВ Автосвіт"
          },
          "masq": {
            "type": "boolean",
            "description": "Ознака маскараду (BEZNAL)",
            "example": false
          },
          "region_name": {
            "type": "string",
            "nullable": true,
            "example": "Київська область"
          },
          "region_uuid": {
            "type": "string",
            "nullable": true
          },
          "services": {
            "$ref": "#/components/schemas/ProfileServicesSchema"
          },
          "payment_clients": {
            "nullable": true
          },
          "currency_uuid": {
            "type": "string",
            "nullable": true
          },
          "is_verified": {
            "type": "boolean",
            "example": true
          },
          "uuid": {
            "type": "string",
            "example": "81ED005056AC66D611EA474924EF8D11"
          }
        }
      },
      "ProfilePaymentClientsResponseSchema": {
        "type": "object",
        "properties": {
          "clients": {
            "description": "Об'єкт або масив контрагентів з перекиданням платежів. Порожній {} / [] якщо підлеглих немає"
          }
        }
      },
      "ProfilePhoneItemSchema": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "example": "+38 (050) 123-45-67"
          },
          "name": {
            "type": "string",
            "example": "ТОВ Автосвіт"
          },
          "uuid": {
            "type": "string",
            "example": "81ED005056AC66D611EA474924EF8D11"
          }
        }
      },
      "ProfilePhonesResponseSchema": {
        "type": "object",
        "properties": {
          "phones": {
            "type": "array",
            "nullable": true,
            "description": "Список телефонів або null, якщо немає контактів",
            "items": {
              "$ref": "#/components/schemas/ProfilePhoneItemSchema"
            }
          }
        }
      },
      "ProfilePreferenceExtraSchema": {
        "type": "object",
        "properties": {
          "brands": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ProfileExtraBrandSchema"
            }
          },
          "interval": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ProfileExtraIntervalSchema"
            }
          }
        }
      },
      "ProfilePreferencesSchema": {
        "type": "object",
        "properties": {
          "extra": {
            "$ref": "#/components/schemas/ProfilePreferenceExtraSchema"
          }
        }
      },
      "ProfileSettingsMetaSchema": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "example": "0.0.1"
          }
        }
      },
      "ProfilePreferenceGetResponseSchema": {
        "type": "object",
        "properties": {
          "preferences": {
            "$ref": "#/components/schemas/ProfilePreferencesSchema"
          },
          "meta": {
            "$ref": "#/components/schemas/ProfileSettingsMetaSchema"
          }
        }
      },
      "ProfileSearchHistoryItemSchema": {
        "type": "object",
        "properties": {
          "not_found": {
            "type": "boolean",
            "example": false,
            "description": "Застаріле поле"
          },
          "is_vin": {
            "type": "boolean",
            "example": false
          },
          "searched_at": {
            "type": "string",
            "example": "2024-03-15T10:30:00"
          },
          "search_string": {
            "type": "string",
            "example": "OC47"
          },
          "car_model": {
            "type": "string",
            "nullable": true,
            "example": ""
          }
        }
      },
      "ProfileSearchHistoryResponseSchema": {
        "type": "object",
        "properties": {
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileSearchHistoryItemSchema"
            }
          }
        }
      },
      "ProfileSettingsDeleteResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Налаштування успішно видалено."
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "ProfileSettingsGetResponseSchema": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/ProfileSettingsMetaSchema"
          },
          "settings": {
            "type": "object",
            "description": "Налаштування клієнтського застосунку"
          }
        }
      },
      "ProfileSettingsMetaSchema2": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "example": "0.0.1"
          }
        }
      },
      "ProfileSettingsSaveResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "meta": {
            "$ref": "#/components/schemas/ProfileSettingsMetaSchema2"
          },
          "errors": {
            "type": "object",
            "description": "Помилки форми, якщо success=false"
          },
          "settings": {
            "type": "object"
          }
        },
        "required": [
          "success"
        ]
      },
      "ProfileSettingsUpdateResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "meta": {
            "$ref": "#/components/schemas/ProfileSettingsMetaSchema2"
          },
          "settings": {
            "type": "object"
          }
        },
        "required": [
          "success"
        ]
      },
      "ReportGridMetaSchema": {
        "type": "object",
        "properties": {
          "header": {
            "type": "boolean",
            "example": false
          },
          "important": {
            "type": "boolean",
            "example": false
          }
        },
        "required": [
          "header"
        ]
      },
      "BrandsTurnoverGridRowSchema": {
        "type": "object",
        "properties": {
          "row": {
            "type": "array",
            "description": "Колонки рядка: назва, всього, місяці",
            "items": {}
          },
          "meta": {
            "$ref": "#/components/schemas/ReportGridMetaSchema"
          }
        },
        "required": [
          "meta",
          "row"
        ]
      },
      "BrandsTurnoverResponseSchema": {
        "type": "object",
        "properties": {
          "grid": {
            "description": "Закупівлі за брендами",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandsTurnoverGridRowSchema"
            }
          }
        },
        "required": [
          "grid"
        ]
      },
      "CarrierTurnoverGridRowSchema": {
        "type": "object",
        "properties": {
          "inherit_rows": {
            "type": "array",
            "nullable": true,
            "description": "Підрядки доставок, або null для заголовка",
            "items": {
              "type": "array",
              "items": {}
            }
          },
          "row": {
            "type": "array",
            "description": "Колонки рядка: назва, всього, місяці",
            "items": {}
          },
          "meta": {
            "$ref": "#/components/schemas/ReportGridMetaSchema"
          }
        },
        "required": [
          "meta",
          "row"
        ]
      },
      "CarrierTurnoverResponseSchema": {
        "type": "object",
        "properties": {
          "grid": {
            "description": "Закупівлі за доставками",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierTurnoverGridRowSchema"
            }
          }
        },
        "required": [
          "grid"
        ]
      },
      "DebtTermsCurrencySchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "978"
          },
          "name": {
            "type": "string",
            "example": "EUR"
          }
        }
      },
      "DebtTermsDataAfterSchema": {
        "type": "object",
        "properties": {
          "headerafter": {
            "type": "array",
            "example": [
              "0-7",
              "8-14"
            ],
            "items": {
              "type": "string"
            }
          },
          "blockafter": {
            "type": "array",
            "description": "Суми за договорами після дати",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "debt": {
            "type": "array",
            "nullable": true,
            "description": "Сумарна заборгованість за колонками",
            "items": {
              "type": "number"
            }
          }
        }
      },
      "DebtTermsDataBeforeSchema": {
        "type": "object",
        "properties": {
          "headerbefore": {
            "type": "array",
            "example": [
              "0-7",
              "8-14"
            ],
            "items": {
              "type": "string"
            }
          },
          "debt": {
            "type": "array",
            "nullable": true,
            "description": "Сумарна заборгованість за колонками",
            "items": {
              "type": "number"
            }
          },
          "blockbefore": {
            "type": "array",
            "description": "Суми за договорами до дати",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          }
        }
      },
      "DebtTermsSchema": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/DebtTermsCurrencySchema"
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "currency_name": {
            "type": "string",
            "example": "EUR"
          },
          "contracts": {
            "type": "array",
            "description": "Назви договорів",
            "items": {
              "type": "string"
            }
          },
          "result": {
            "type": "boolean"
          },
          "debts": {
            "type": "array",
            "description": "Суми заборгованості",
            "items": {
              "type": "number"
            }
          },
          "dataafter": {
            "$ref": "#/components/schemas/DebtTermsDataAfterSchema"
          },
          "databefore": {
            "$ref": "#/components/schemas/DebtTermsDataBeforeSchema"
          }
        }
      },
      "DebtTermsResponseSchema": {
        "type": "object",
        "properties": {
          "terms": {
            "description": "Звіт за строками боргу",
            "allOf": [
              {
                "$ref": "#/components/schemas/DebtTermsSchema"
              }
            ]
          }
        },
        "required": [
          "terms"
        ]
      },
      "GroupsTurnoverCurrencySchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "EUR"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "GroupsTurnoverPeriodSchema": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Липень 2026"
          },
          "value": {
            "type": "number",
            "example": 84.89
          }
        }
      },
      "GroupsTurnoverGroupSchema": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Сума закупівель за період"
          },
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupsTurnoverPeriodSchema"
            }
          },
          "children": {
            "type": "array",
            "nullable": true,
            "description": "Дочірні категорії такої ж структури, або null",
            "items": {
              "type": "object"
            }
          },
          "name": {
            "type": "string",
            "example": "ІНСТРУМЕНТИ"
          },
          "path": {
            "type": "string",
            "description": "Повний шлях категорії через `/`"
          }
        }
      },
      "GroupsTurnoverResponseSchema": {
        "type": "object",
        "properties": {
          "groups": {
            "nullable": true,
            "description": "Закупівлі за товарними групами",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupsTurnoverGroupSchema"
            }
          },
          "currency": {
            "$ref": "#/components/schemas/GroupsTurnoverCurrencySchema"
          }
        },
        "required": [
          "currency"
        ]
      },
      "NestedDataSettlementsReconciliationSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "comment": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "pattern": null
          },
          "flag": {
            "type": "number"
          },
          "in_balance": {
            "type": "number",
            "nullable": true
          },
          "out_balance": {
            "type": "number",
            "nullable": true
          },
          "currency_name": {
            "type": "string",
            "nullable": true
          },
          "document_url": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "after_transaction": {
            "type": "number"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "PaymentReportDocumentSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "balance": {
            "type": "number"
          },
          "currency_name": {
            "type": "string"
          },
          "balance_plan": {
            "type": "number"
          },
          "number": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "PaymentReportClientSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentReportDocumentSchema"
            }
          },
          "balance": {
            "type": "number"
          },
          "balance_plan": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "PaymentReportStatusSchema": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "number"
          },
          "balance_plan": {
            "type": "number"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentReportClientSchema"
            }
          },
          "name": {
            "type": "string"
          }
        }
      },
      "PaymentReportDataSchema": {
        "type": "object",
        "properties": {
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentReportStatusSchema"
            }
          },
          "balance": {
            "type": "number"
          },
          "currency_name": {
            "type": "string"
          },
          "balance_plan": {
            "type": "number"
          },
          "excel_url": {
            "type": "string",
            "description": "Посилання на XLS-файл звіту",
            "example": "https://api.bm.parts/reports/download/payment_report/xls"
          }
        }
      },
      "PaymentReportSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentReportDataSchema"
              }
            ]
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "data",
          "error",
          "result"
        ]
      },
      "PaymentReportResponseSchema": {
        "type": "object",
        "properties": {
          "report": {
            "description": "Звіт про оплати",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentReportSchema"
              }
            ]
          }
        },
        "required": [
          "report"
        ]
      },
      "ReportDocumentOwnerSchema": {
        "type": "object",
        "properties": {
          "f": {
            "type": "integer",
            "description": "Тип договору: ghost/dag/zag",
            "example": 1
          },
          "number": {
            "type": "string",
            "example": "000067193"
          },
          "name": {
            "type": "string",
            "example": "Контрагент [000067193]"
          },
          "uuid": {
            "type": "string",
            "example": "9308005056BA7D7A11F095438B55DEC4"
          }
        }
      },
      "ReportStateSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Опис стану (напр. причина відмови)"
          },
          "name": {
            "type": "string",
            "example": "Непогоджений"
          },
          "uuid": {
            "type": "string",
            "example": "AD6E2578EE9640194A397F25A92EFCB0"
          }
        }
      },
      "ReportBrandSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "ROWE"
          },
          "uuid": {
            "type": "string",
            "example": "92E8005056BA7D7A11EE1C01384C1BD0"
          }
        }
      },
      "ReportProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/ReportBrandSchema"
          },
          "article": {
            "type": "string",
            "example": "20031-0010-99"
          },
          "uuid": {
            "type": "string",
            "example": "94F121C158DD4DD54ECAA1F71661AF5E"
          },
          "name": {
            "type": "string",
            "example": "Олива HIGHTEC 2T SCOOTER M (1L)"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReportReturnDocumentProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ReportProductSchema"
          },
          "auto_discount": {
            "type": "number",
            "example": 0.0
          },
          "total": {
            "type": "number",
            "example": 278.46
          },
          "price": {
            "type": "number",
            "example": 278.46
          },
          "discount": {
            "type": "number",
            "example": 0.0
          },
          "quantity": {
            "type": "number",
            "example": 1.0
          },
          "line_num": {
            "type": "integer",
            "example": 1
          }
        }
      },
      "ReportReturnDocumentSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportDocumentOwnerSchema"
              }
            ]
          },
          "total": {
            "type": "number",
            "example": 278.46
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "document_url": {
            "type": "string"
          },
          "currency_name": {
            "type": "string",
            "example": "ГРН"
          },
          "number": {
            "type": "string",
            "example": "ДГ001197513"
          },
          "type": {
            "type": "string",
            "example": "000000C1"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportReturnDocumentProductSchema"
            }
          },
          "uuid": {
            "type": "string",
            "example": "8200005056BA39E811F1424875092228"
          }
        }
      },
      "ReclamationsReportDocumentSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportDocumentOwnerSchema"
              }
            ]
          },
          "state": {
            "nullable": true,
            "description": "Стан документа, або null",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportStateSchema"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "document_url": {
            "type": "string"
          },
          "return_document": {
            "nullable": true,
            "description": "Пов'язаний документ повернення, або null",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportReturnDocumentSchema"
              }
            ]
          },
          "number": {
            "type": "string",
            "example": "000333545"
          },
          "type": {
            "type": "string",
            "example": "0000415D"
          },
          "document_name": {
            "type": "string",
            "example": "Заявка на повернення"
          },
          "uuid": {
            "type": "string",
            "example": "8200005056BA39E811F13FE2A76D9059"
          }
        }
      },
      "ReclamationsReportResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "description": "Акти рекламації з документом повернення",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReclamationsReportDocumentSchema"
            }
          },
          "calculated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Час розрахунку звіту"
          }
        },
        "required": [
          "calculated_at",
          "documents"
        ]
      },
      "ReportDocumentProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/ReportBrandSchema"
          },
          "state": {
            "nullable": true,
            "description": "Стан позиції, або null",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportStateSchema"
              }
            ]
          },
          "quantity": {
            "type": "integer",
            "example": 1
          },
          "article": {
            "type": "string",
            "example": "20031-0010-99"
          },
          "uuid": {
            "type": "string",
            "example": "94F121C158DD4DD54ECAA1F71661AF5E"
          },
          "name": {
            "type": "string",
            "example": "Олива HIGHTEC 2T SCOOTER M (1L)"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReportsReportProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/ReportBrandSchema"
          },
          "article": {
            "type": "string",
            "example": "20031-0010-99"
          },
          "uuid": {
            "type": "string",
            "example": "94F121C158DD4DD54ECAA1F71661AF5E"
          },
          "name": {
            "type": "string",
            "example": "Олива HIGHTEC 2T SCOOTER M (1L)"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReportsReportReturnDocumentProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ReportsReportProductSchema"
          },
          "auto_discount": {
            "type": "number",
            "example": 0.0
          },
          "total": {
            "type": "number",
            "example": 278.46
          },
          "price": {
            "type": "number",
            "example": 278.46
          },
          "discount": {
            "type": "number",
            "example": 0.0
          },
          "quantity": {
            "type": "number",
            "example": 1.0
          },
          "line_num": {
            "type": "integer",
            "example": 1
          }
        }
      },
      "ReportsReportReturnDocumentSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportDocumentOwnerSchema"
              }
            ]
          },
          "total": {
            "type": "number",
            "example": 278.46
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "document_url": {
            "type": "string"
          },
          "currency_name": {
            "type": "string",
            "example": "ГРН"
          },
          "number": {
            "type": "string",
            "example": "ДГ001197513"
          },
          "type": {
            "type": "string",
            "example": "000000C1"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportsReportReturnDocumentProductSchema"
            }
          },
          "uuid": {
            "type": "string",
            "example": "8200005056BA39E811F1424875092228"
          }
        }
      },
      "ReturnsReportDocumentSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportDocumentOwnerSchema"
              }
            ]
          },
          "state": {
            "nullable": true,
            "description": "Стан документа, або null",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportStateSchema"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "document_url": {
            "type": "string"
          },
          "return_documents": {
            "nullable": true,
            "description": "Пов'язані документи повернення",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportsReportReturnDocumentSchema"
            }
          },
          "number": {
            "type": "string",
            "example": "000333545"
          },
          "type": {
            "type": "string",
            "example": "0000415D"
          },
          "document_name": {
            "type": "string",
            "example": "Заявка на повернення"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportDocumentProductSchema"
            }
          },
          "uuid": {
            "type": "string",
            "example": "8200005056BA39E811F13FE2A76D9059"
          }
        }
      },
      "ReturnsReportResponseSchema": {
        "type": "object",
        "properties": {
          "documents": {
            "description": "Заявки на повернення, видаткові накладні та акти рекламації з документами повернення",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnsReportDocumentSchema"
            }
          },
          "calculated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Час розрахунку звіту"
          }
        },
        "required": [
          "calculated_at",
          "documents"
        ]
      },
      "SettlementsReconciliationSchema": {
        "type": "object",
        "properties": {
          "balance_before": {
            "type": "number",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NestedDataSettlementsReconciliationSchema"
            }
          },
          "in_balance": {
            "type": "number",
            "nullable": true
          },
          "out_balance": {
            "type": "number",
            "nullable": true
          },
          "contract": {
            "type": "string",
            "nullable": true
          },
          "currency_name": {
            "type": "string",
            "nullable": true
          },
          "excel_url": {
            "type": "string"
          },
          "pdf_url": {
            "type": "string"
          },
          "result": {
            "type": "boolean"
          },
          "balance_after": {
            "type": "number",
            "nullable": true
          }
        }
      },
      "SettlementsReconciliationResponseSchema": {
        "type": "object",
        "properties": {
          "report": {
            "description": "Звірка взаєморозрахунків",
            "allOf": [
              {
                "$ref": "#/components/schemas/SettlementsReconciliationSchema"
              }
            ]
          }
        },
        "required": [
          "report"
        ]
      },
      "AttachmentSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "url"
        ]
      },
      "ReclamationDraftFormSchema": {
        "type": "object",
        "properties": {
          "sales_doc_uuid": {
            "type": "string"
          },
          "defect_description": {
            "type": "string",
            "nullable": true
          },
          "car_engine": {
            "type": "string",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/AttachmentSchema"
            }
          },
          "car_model": {
            "type": "string",
            "nullable": true
          },
          "odometer_end": {
            "type": "integer",
            "nullable": true
          },
          "partner_address": {
            "type": "string",
            "nullable": true
          },
          "partner_name": {
            "type": "string",
            "nullable": true
          },
          "product_uuid": {
            "type": "string"
          },
          "car_code": {
            "type": "string",
            "nullable": true
          },
          "disassembling_at": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "minimum": 1
          },
          "diagnostic_equipment": {
            "type": "string",
            "nullable": true
          },
          "partner_unit": {
            "type": "string",
            "nullable": true
          },
          "partner_phone": {
            "type": "string",
            "nullable": true
          },
          "installation_at": {
            "type": "string",
            "nullable": true
          },
          "defect_cause": {
            "type": "string",
            "nullable": true
          },
          "prod_year": {
            "nullable": true
          },
          "odometer_start": {
            "type": "integer",
            "nullable": true
          },
          "defect_detection_case": {
            "type": "string",
            "nullable": true
          },
          "car_brand": {
            "type": "string",
            "nullable": true
          },
          "car_number": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "product_uuid",
          "quantity",
          "sales_doc_uuid"
        ]
      },
      "ReturnProductsAddItemSchema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object"
          },
          "price": {
            "type": "number"
          },
          "return_cause_uuid": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "client_uuid": {
            "type": "string"
          },
          "document_uuid": {
            "type": "string"
          },
          "product_uuid": {
            "type": "string"
          }
        }
      },
      "ReturnProductsAddResponseSchema": {
        "type": "object",
        "properties": {
          "err_rows": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "success_rows": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsAddItemSchema"
            }
          }
        }
      },
      "ReturnProductsCreateReclamationResponseSchema": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string"
          },
          "document_name": {
            "type": "string",
            "example": "Заявка на рекламацію"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ReturnProductsDeleteReclamationResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ReturnProductsDeleteResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "ReturnProductsDetectionCaseSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ReturnProductsDetectionCasesResponseSchema": {
        "type": "object",
        "properties": {
          "detection_cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsDetectionCaseSchema"
            }
          }
        }
      },
      "ReturnProductsEditReclamationResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ReturnProductsImportProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "nullable": true
          },
          "multiplicity": {
            "type": "integer",
            "nullable": true
          },
          "article": {
            "type": "string"
          }
        }
      },
      "ReturnProductsImportItemSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ReturnProductsImportProductSchema"
          },
          "document_link": {
            "type": "string",
            "nullable": true
          },
          "document_number": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          }
        }
      },
      "ReturnProductsImportFileResponseSchema": {
        "type": "object",
        "properties": {
          "success_rows": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsImportItemSchema"
            }
          },
          "download_error_rows": {
            "type": "string",
            "nullable": true
          },
          "error_rows": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsImportItemSchema"
            }
          }
        }
      },
      "ReturnProductsProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "object",
            "nullable": true
          },
          "multiplicity": {
            "type": "integer",
            "nullable": true
          },
          "article": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReturnProductsPublicItemSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ReturnProductsProductSchema"
          },
          "price": {
            "nullable": true,
            "description": "Цена"
          },
          "sold_quantity": {
            "type": "integer"
          },
          "quantity": {
            "type": "integer"
          },
          "document": {
            "type": "object",
            "properties": {
              "owner": {
                "type": "object"
              },
              "currency": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true,
                    "description": "Наименование"
                  }
                }
              },
              "document_url": {},
              "number": {
                "nullable": true,
                "description": "Номер документа"
              },
              "type": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаИзменения",
            "pattern": null
          },
          "return_cause": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Код причини повернення",
                "example": "000026117"
              },
              "name": {
                "type": "string",
                "description": "Назва причини повернення",
                "example": "Брак"
              },
              "uuid": {
                "type": "string",
                "description": "UUID причини повернення",
                "example": "CA000000000000000000000000000001"
              }
            }
          },
          "available": {
            "type": "integer"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        }
      },
      "ReturnProductsListResponseSchema": {
        "type": "object",
        "properties": {
          "returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsPublicItemSchema"
            }
          }
        }
      },
      "ReturnProductsProductSchema2": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "object",
            "nullable": true
          },
          "multiplicity": {
            "type": "integer",
            "nullable": true
          },
          "article": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReturnProductsPublicReclamationSchema": {
        "type": "object",
        "properties": {
          "sale_doc_product": {
            "type": "object",
            "properties": {
              "price": {
                "type": "number"
              },
              "quantity": {
                "type": "integer"
              }
            }
          },
          "sales_doc": {
            "type": "object",
            "properties": {
              "owner": {
                "type": "object"
              },
              "currency": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true,
                    "description": "Наименование"
                  }
                }
              },
              "document_url": {},
              "number": {
                "nullable": true,
                "description": "Номер документа"
              },
              "type": {
                "type": "string"
              },
              "document_name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "readOnly": true
                },
                "name": {
                  "readOnly": true
                }
              }
            }
          },
          "car_engine": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "Двигатель"
          },
          "defect_description": {
            "type": "string",
            "nullable": true,
            "description": "ОписаниеНеисправности"
          },
          "car_model": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "МодельАвтомобиля"
          },
          "is_draft": {
            "type": "boolean",
            "readOnly": true,
            "example": false
          },
          "odometer_end": {
            "type": "number",
            "nullable": true,
            "description": "ОдометрНаКонец"
          },
          "partner_address": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "АдресОрганизации"
          },
          "partner_name": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "НаименованиеОрганизации"
          },
          "created_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "Дата документа",
            "pattern": null
          },
          "number": {
            "nullable": true,
            "description": "Номер документа"
          },
          "car_code": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "КодКузова"
          },
          "disassembling_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаДемонтажа",
            "pattern": null
          },
          "product": {
            "$ref": "#/components/schemas/ReturnProductsProductSchema2"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "description": "Комментарий"
          },
          "quantity": {
            "type": "number",
            "nullable": true,
            "description": "Количество"
          },
          "diagnostic_equipment": {
            "type": "string",
            "nullable": true,
            "maxLength": 500,
            "description": "ДиагностическоеОборудование"
          },
          "partner_unit": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "СотрудникОрганизации"
          },
          "partner_phone": {
            "type": "string",
            "nullable": true,
            "maxLength": 20,
            "description": "ТелефонОрганизации"
          },
          "installation_at": {
            "type": "string",
            "format": null,
            "nullable": true,
            "description": "ДатаУстановки",
            "pattern": null
          },
          "prod_year": {
            "type": "string",
            "nullable": true,
            "maxLength": 4,
            "description": "ГодВыпуска"
          },
          "defect_cause": {
            "type": "string",
            "nullable": true,
            "description": "ПредполагаемаяПричинаНеисправности"
          },
          "odometer_start": {
            "type": "number",
            "nullable": true,
            "description": "ОдометрНаНачало"
          },
          "reject_cause": {
            "type": "string",
            "nullable": true,
            "description": "ПричинаОтказа"
          },
          "photo_or_video": {
            "type": "boolean",
            "nullable": true,
            "description": "ЕстьФотоВидео"
          },
          "defect_detection_case": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "ОбстоятельствоОбнаруженияНеисправности"
          },
          "car_brand": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "МаркаАвтомобиля"
          },
          "car_number": {
            "type": "string",
            "nullable": true,
            "maxLength": 100,
            "description": "ГосНомерАвтомобиля"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "ReturnProductsQuickFilterSchema": {
        "type": "object",
        "properties": {
          "enabled_tags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string"
          },
          "enabled_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ReturnProductsQuickFiltersResponseSchema": {
        "type": "object",
        "properties": {
          "quick_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsQuickFilterSchema"
            }
          }
        }
      },
      "ReturnProductsReclamationsListResponseSchema": {
        "type": "object",
        "properties": {
          "acts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsPublicReclamationSchema"
            }
          }
        }
      },
      "ReturnProductsSaveFormResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Форму рекламації збережено як чернетку."
          }
        }
      },
      "ReturnProductsSoldItemSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ReturnProductsProductSchema2"
          },
          "price": {
            "type": "number"
          },
          "quantity": {
            "type": "integer"
          },
          "document": {
            "type": "object",
            "properties": {
              "owner": {
                "type": "object"
              },
              "currency": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true,
                    "description": "Наименование"
                  }
                }
              },
              "document_url": {},
              "number": {
                "nullable": true,
                "description": "Номер документа"
              },
              "type": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          }
        }
      },
      "ReturnProductsSoldResponseSchema": {
        "type": "object",
        "properties": {
          "products": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnProductsSoldItemSchema"
            }
          }
        }
      },
      "ReturnProductsUpdateQuantityResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Кількість успішно змінено"
          }
        }
      },
      "ReturningCausesSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Код причини повернення",
            "example": "000026117"
          },
          "name": {
            "type": "string",
            "description": "Назва причини повернення",
            "example": "Брак"
          },
          "uuid": {
            "type": "string",
            "description": "UUID причини повернення",
            "example": "CA000000000000000000000000000001"
          }
        }
      },
      "ReturnsCausesResponseSchema": {
        "type": "object",
        "properties": {
          "returning_causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturningCausesSchema"
            }
          }
        }
      },
      "ReturnsNotifyResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReturnsProductItemSchema": {
        "type": "object",
        "properties": {
          "multiplicity": {
            "type": "integer",
            "nullable": true
          },
          "code": {
            "type": "string"
          },
          "article": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          }
        }
      },
      "ReturnsProductsDataSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnsProductItemSchema"
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ReturnsProductsResponseSchema": {
        "type": "object",
        "properties": {
          "returning_products": {
            "$ref": "#/components/schemas/ReturnsProductsDataSchema"
          }
        }
      },
      "ReturnsRateRuleSchema": {
        "type": "object",
        "properties": {
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number",
            "nullable": true
          },
          "penalty_days": {
            "type": "integer"
          }
        }
      },
      "ReturnsRateResponseSchema": {
        "type": "object",
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnsRateRuleSchema"
            }
          },
          "current_penalty_days": {
            "type": "integer",
            "example": 0
          },
          "current_value": {
            "type": "number",
            "example": 4.25
          },
          "severity": {
            "type": "string",
            "example": "low"
          }
        }
      },
      "ReturnsRequestResponseSchema": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "document_url": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "boolean",
            "example": true
          },
          "countrecord": {
            "type": "integer",
            "nullable": true
          },
          "uuid": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SearchAdvertisementItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Літня акція"
          },
          "products_count": {
            "type": "integer",
            "nullable": true,
            "example": 56
          },
          "uuid": {
            "type": "string",
            "example": "A1B2000C2947F7AE11E23F5617780B16"
          }
        },
        "required": [
          "name",
          "uuid"
        ]
      },
      "SearchAggregationCountSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "BOSCH"
          },
          "products_count": {
            "type": "integer",
            "example": 128
          }
        },
        "required": [
          "name",
          "products_count"
        ]
      },
      "SearchAggregationsAdvertisementsResponseSchema": {
        "type": "object",
        "properties": {
          "advertisements": {
            "type": "array",
            "description": "Активні акції у вибірці",
            "items": {
              "$ref": "#/components/schemas/SearchAdvertisementItemSchema"
            }
          }
        },
        "required": [
          "advertisements"
        ]
      },
      "SearchAggregationsBrandsResponseSchema": {
        "type": "object",
        "properties": {
          "brands": {
            "type": "array",
            "description": "Агрегація за брендами",
            "items": {
              "$ref": "#/components/schemas/SearchAggregationCountSchema"
            }
          }
        },
        "required": [
          "brands"
        ]
      },
      "SearchAggregationsCarEnginesResponseSchema": {
        "type": "object",
        "properties": {
          "engines": {
            "description": "Двигуни: масив {name, products_count} або об'єкт name→{products_count}"
          }
        },
        "required": [
          "engines"
        ]
      },
      "SearchAggregationsCarModelsResponseSchema": {
        "type": "object",
        "properties": {
          "models": {
            "description": "Моделі: масив {name, products_count} або об'єкт name→{products_count}"
          }
        },
        "required": [
          "models"
        ]
      },
      "SearchAggregationsCarsResponseSchema": {
        "type": "object",
        "properties": {
          "cars": {
            "description": "Марки авто: масив {name, products_count} (cars_as=arr) або об'єкт name→{products_count} (cars_as=obj). З параметром cars можуть бути models/engines"
          }
        },
        "required": [
          "cars"
        ]
      },
      "SearchEndNodesBlockSchema": {
        "type": "object",
        "properties": {
          "more": {
            "type": "boolean",
            "example": false
          },
          "nodes": {
            "nullable": true,
            "description": "До 10 кінцевих вузлів: масив {path, name} або об'єкт, або null"
          },
          "total": {
            "type": "integer",
            "example": 24
          }
        },
        "required": [
          "more",
          "total"
        ]
      },
      "SearchAggregationsEndNodesResponseSchema": {
        "type": "object",
        "properties": {
          "end_nodes": {
            "$ref": "#/components/schemas/SearchEndNodesBlockSchema"
          }
        },
        "required": [
          "end_nodes"
        ]
      },
      "SearchAggregationsNodesResponseSchema": {
        "type": "object",
        "properties": {
          "nodes": {
            "description": "Вузли: масив {path, name} (nodes_as=arr) або об'єкт path→{name} (nodes_as=obj). З sub_nodes — кореневе дерево вузлів"
          },
          "sub_nodes": {
            "type": "object",
            "nullable": true,
            "description": "Підвузли за шляхом, лише якщо передано sub_nodes"
          }
        },
        "required": [
          "nodes"
        ]
      },
      "SearchBadgesResponseSchema": {
        "type": "object",
        "properties": {
          "badges": {
            "type": "array",
            "description": "Бейджі з вибірки (відсортовані рядки)",
            "example": [
              "dsc",
              "exclusive",
              "new",
              "promo",
              "season",
              "top"
            ],
            "items": {
              "type": "string",
              "enum": [
                "dsc",
                "exclusive",
                "new",
                "promo",
                "season",
                "top",
                "promos",
                "reduced_price",
                "wholesale",
                "discontinued"
              ]
            }
          }
        },
        "required": [
          "badges"
        ]
      },
      "SearchContractQuantitySchema": {
        "type": "object",
        "properties": {
          "f": {
            "type": "integer",
            "description": "Ідентифікатор типу договору",
            "example": 1
          },
          "quantity": {
            "type": "string",
            "nullable": true,
            "description": "Кількість за договором",
            "example": "12"
          }
        }
      },
      "SearchFilterValueSchema": {
        "type": "object",
        "properties": {
          "products_count": {
            "type": "integer",
            "example": 12
          },
          "value": {
            "type": "string",
            "example": "Оливний"
          }
        },
        "required": [
          "products_count",
          "value"
        ]
      },
      "SearchFilterGroupSchema": {
        "type": "object",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchFilterValueSchema"
            }
          },
          "name": {
            "type": "string",
            "example": "Тип"
          }
        },
        "required": [
          "name",
          "values"
        ]
      },
      "SearchGroupFiltersResponseSchema": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "array",
            "nullable": true,
            "description": "Фільтри групи або null",
            "items": {
              "$ref": "#/components/schemas/SearchFilterGroupSchema"
            }
          }
        }
      },
      "SearchPartnerCatalogSchema": {
        "type": "object",
        "properties": {
          "image_url": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "example": "BOSCH Catalog"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "example": "https://example.com/catalog"
          }
        }
      },
      "SearchGroupItemSchema": {
        "type": "object",
        "properties": {
          "partners_catalogs": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/SearchPartnerCatalogSchema"
            }
          },
          "path": {
            "type": "string",
            "example": "Двигун"
          },
          "products_count": {
            "type": "integer",
            "example": 1500
          },
          "children": {
            "nullable": true,
            "description": "Дочірні групи або null",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchGroupItemSchema"
            }
          },
          "name": {
            "type": "string",
            "example": "Двигун"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "path",
          "products_count"
        ]
      },
      "SearchGroupsResponseSchema": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "nullable": true,
            "description": "Дерево товарних груп або null",
            "items": {
              "$ref": "#/components/schemas/SearchGroupItemSchema"
            }
          }
        }
      },
      "SearchHeaderSchema": {
        "type": "object",
        "properties": {
          "short_name": {
            "type": "string",
            "nullable": true,
            "description": "Коротка назва складу",
            "example": "Київ"
          },
          "labels": {
            "type": "array",
            "nullable": true,
            "description": "Підписи колонок залишків за договорами",
            "items": {
              "type": "string"
            }
          },
          "is_main": {
            "type": "boolean",
            "nullable": true,
            "description": "Основний склад клієнта",
            "example": true
          },
          "warehouse": {
            "type": "string",
            "description": "Назва складу",
            "example": "Київ"
          }
        }
      },
      "SearchHistoryItemSchema": {
        "type": "object",
        "properties": {
          "not_found": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "searched_at": {
            "type": "string",
            "description": "Час пошуку",
            "example": "2026-08-14T10:15:00"
          },
          "is_vin": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "search_string": {
            "type": "string",
            "description": "Пошуковий запит",
            "example": "амортизатор"
          },
          "car_model": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "search_string",
          "searched_at"
        ]
      },
      "SearchHistoryResponseSchema": {
        "type": "object",
        "properties": {
          "history": {
            "type": "array",
            "description": "Історія пошукових фраз",
            "items": {
              "$ref": "#/components/schemas/SearchHistoryItemSchema"
            }
          }
        },
        "required": [
          "history"
        ]
      },
      "SearchHitsSchema": {
        "type": "object",
        "properties": {
          "hits": {
            "type": "integer",
            "description": "Кількість знайдених записів",
            "example": 42
          },
          "total_pages": {
            "type": "integer",
            "description": "Кількість сторінок (пошук товарів)",
            "example": 3
          }
        },
        "required": [
          "hits"
        ]
      },
      "SearchStockItemSchema": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean",
            "nullable": true,
            "description": "Основний склад клієнта",
            "example": true
          },
          "contract_quantities": {
            "type": "array",
            "nullable": true,
            "description": "Залишки за договорами",
            "items": {
              "$ref": "#/components/schemas/SearchContractQuantitySchema"
            }
          },
          "quantity": {
            "type": "string",
            "nullable": true,
            "description": "Кількість (рядок)",
            "example": "12"
          },
          "short_name": {
            "type": "string",
            "nullable": true,
            "description": "Коротка назва складу",
            "example": "Київ"
          },
          "uuid": {
            "type": "string",
            "nullable": true,
            "description": "UUID складу",
            "example": "81F4005056AC66D611EAD7173350C7AA"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Назва складу",
            "example": "Київ"
          },
          "has_reserves": {
            "type": "boolean",
            "nullable": true,
            "description": "Є резерви на складі",
            "example": false
          }
        }
      },
      "SearchProductItemSchema": {
        "type": "object",
        "properties": {
          "multiplicity": {
            "type": "integer",
            "nullable": true,
            "example": 1
          },
          "badges": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "article": {
            "type": "string",
            "nullable": true,
            "example": "OC47"
          },
          "special_offer": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "found_by": {
            "type": "string",
            "nullable": true
          },
          "currency_name": {
            "type": "string",
            "nullable": true,
            "example": "UAH"
          },
          "restricted_delivery": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "brand": {
            "type": "string",
            "nullable": true,
            "example": "BOSCH"
          },
          "highlight": {
            "nullable": true,
            "description": "Підсвітка збігів Elastic (search_mode strict/partial)"
          },
          "in_waiting": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchStockItemSchema"
              }
            ]
          },
          "in_wishlist": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "promotion": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "promos": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "new_product": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Оливний фільтр"
          },
          "in_cart": {
            "type": "object",
            "nullable": true,
            "description": "Кількість у кошику: об'єкт cart_uuid → кількість",
            "example": {
              "47db3f5e8cc64169a1ec710e93c02f55": 1
            },
            "additionalProperties": {
              "type": "integer"
            }
          },
          "price": {
            "type": "string",
            "nullable": true,
            "example": "325.50"
          },
          "tools": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "default_image": {
            "type": "string",
            "nullable": true
          },
          "in_others": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchStockItemSchema"
              }
            ]
          },
          "in_stocks": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/SearchStockItemSchema"
            }
          },
          "available": {
            "type": "boolean",
            "nullable": true,
            "example": true
          },
          "uuid": {
            "type": "string",
            "description": "UUID товару (лише якщо products_as=arr)",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        }
      },
      "SearchProductsByUuidResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "hits та total_pages",
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchHitsSchema"
              }
            ]
          },
          "headers": {
            "type": "array",
            "description": "Заголовки колонок залишків",
            "items": {
              "$ref": "#/components/schemas/SearchHeaderSchema"
            }
          },
          "products": {
            "type": "object",
            "description": "Товари: об'єкт uuid→картка (products_as=obj) або масив карток з uuid (products_as=arr). Без found_by та highlight",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "brand": {
                  "type": "string",
                  "nullable": true,
                  "example": "BOSCH"
                },
                "in_waiting": {
                  "nullable": true,
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SearchStockItemSchema"
                    }
                  ]
                },
                "multiplicity": {
                  "type": "integer",
                  "nullable": true,
                  "example": 1
                },
                "in_wishlist": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "badges": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string"
                  }
                },
                "article": {
                  "type": "string",
                  "nullable": true,
                  "example": "OC47"
                },
                "promotion": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "uuid": {
                  "type": "string",
                  "description": "UUID товару (лише якщо products_as=arr)",
                  "example": "A2D9EC97246EEB0B46877CB5803BFD99"
                },
                "promos": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string"
                  }
                },
                "special_offer": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "new_product": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "name": {
                  "type": "string",
                  "nullable": true,
                  "example": "Оливний фільтр"
                },
                "in_cart": {
                  "type": "object",
                  "nullable": true,
                  "description": "Кількість у кошику: об'єкт cart_uuid → кількість",
                  "example": {
                    "47db3f5e8cc64169a1ec710e93c02f55": 1
                  },
                  "additionalProperties": {
                    "type": "integer"
                  }
                },
                "price": {
                  "type": "string",
                  "nullable": true,
                  "example": "325.50"
                },
                "tools": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "currency_name": {
                  "type": "string",
                  "nullable": true,
                  "example": "UAH"
                },
                "restricted_delivery": {
                  "type": "boolean",
                  "nullable": true,
                  "example": false
                },
                "in_others": {
                  "nullable": true,
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SearchStockItemSchema"
                    }
                  ]
                },
                "in_stocks": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "$ref": "#/components/schemas/SearchStockItemSchema"
                  }
                },
                "available": {
                  "type": "boolean",
                  "nullable": true,
                  "example": true
                },
                "default_image": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        },
        "required": [
          "headers",
          "products",
          "search"
        ]
      },
      "SearchProductsByUuidsRequestSchema": {
        "type": "object",
        "properties": {
          "product_uuids": {
            "type": "array",
            "description": "Масив UUID товарів для пошуку",
            "example": [
              "A2D9EC97246EEB0B46877CB5803BFD99"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "product_uuids"
        ]
      },
      "SearchProductsResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "hits та total_pages",
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchHitsSchema"
              }
            ]
          },
          "headers": {
            "type": "array",
            "description": "Заголовки колонок залишків",
            "items": {
              "$ref": "#/components/schemas/SearchHeaderSchema"
            }
          },
          "products": {
            "type": "object",
            "description": "Товари: об'єкт uuid→картка (products_as=obj, за замовчуванням) або масив карток з полем uuid (products_as=arr). Структура картки — SearchProductItemSchema",
            "additionalProperties": {
              "$ref": "#/components/schemas/SearchProductItemSchema"
            }
          }
        },
        "required": [
          "headers",
          "products",
          "search"
        ]
      },
      "SearchSuggestProductItemSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "nullable": true,
            "example": "BOSCH"
          },
          "promotion": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "tools": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "article": {
            "type": "string",
            "nullable": true,
            "example": "OC47"
          },
          "uuid": {
            "type": "string",
            "description": "UUID товару (лише якщо products_as=arr)",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          },
          "promos": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "new_product": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Оливний фільтр"
          },
          "special_offer": {
            "type": "boolean",
            "nullable": true,
            "example": false
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SearchSuggestResponseSchema": {
        "type": "object",
        "properties": {
          "search": {
            "description": "Кількість знайдених (hits)",
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchHitsSchema"
              }
            ]
          },
          "suggests": {
            "description": "Підказки: об'єкт uuid→товар (products_as=obj) або масив товарів з uuid (products_as=arr)"
          }
        },
        "required": [
          "search",
          "suggests"
        ]
      },
      "SearchVehicleSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "nullable": true,
            "example": "BMW"
          },
          "gov_number": {
            "type": "string",
            "nullable": true
          },
          "make_year": {
            "type": "string",
            "nullable": true,
            "description": "Рік випуску при відповіді OpenDataBot без запису в Laximo (ключ у відповіді — make_year)"
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "ssd": {
            "type": "string",
            "nullable": true
          },
          "vehicleid": {
            "type": "string",
            "nullable": true,
            "description": "ID автомобіля в каталозі Laximo"
          },
          "info": {
            "type": "string",
            "nullable": true
          },
          "catalog": {
            "type": "string",
            "nullable": true,
            "description": "Код каталогу Laximo"
          },
          "vin_code": {
            "type": "string",
            "nullable": true,
            "example": "WBADT43452G123456"
          },
          "model_year": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SearchSuggestsResponseSchema": {
        "type": "object",
        "properties": {
          "vehicle": {
            "nullable": true,
            "description": "Авто, якщо type=vehicle",
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchVehicleSchema"
              }
            ]
          },
          "found_by": {
            "type": "string",
            "nullable": true,
            "description": "vin, frame або gov_number",
            "example": "vin"
          },
          "hits": {
            "type": "integer",
            "nullable": true,
            "description": "Кількість знайдених товарів",
            "example": 8
          },
          "type": {
            "type": "string",
            "description": "products або vehicle",
            "example": "products"
          },
          "products": {
            "type": "object",
            "nullable": true,
            "description": "Товари, якщо type=products: об'єкт uuid→картка або масив з uuid (products_as=arr)",
            "additionalProperties": {
              "$ref": "#/components/schemas/SearchSuggestProductItemSchema"
            }
          }
        },
        "required": [
          "type"
        ]
      },
      "ImportSettingsSchema": {
        "type": "object",
        "properties": {
          "article_column": {
            "type": "number",
            "nullable": true,
            "description": "КолонкаАртикул"
          },
          "uuid_column": {
            "type": "number",
            "nullable": true,
            "description": "КолонкаUUID"
          },
          "quantity_column": {
            "type": "number",
            "nullable": true,
            "description": "КолонкаКоличество"
          },
          "brand_column": {
            "type": "number",
            "nullable": true,
            "description": "КолонкаБренд"
          },
          "separator": {
            "type": "string",
            "nullable": true,
            "maxLength": 1,
            "description": "Разделитель"
          },
          "code_column": {
            "type": "number",
            "nullable": true,
            "description": "КолонкаКод"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Наименование"
          },
          "import_type": {
            "type": "string",
            "nullable": true,
            "description": "ТипИмпорта"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Ссылка"
          }
        }
      },
      "ShoppingCartWaitingOthersSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "example": "-"
          }
        }
      },
      "ShoppingCartStockItemSchema": {
        "type": "object",
        "properties": {
          "is_main": {
            "type": "boolean"
          },
          "contract_quantities": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "quantity": {
            "type": "string"
          },
          "short_name": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingCartProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "properties": {
              "brand": {
                "$ref": "#/components/schemas/BrandNestedSchema"
              },
              "multiplicity": {
                "readOnly": true
              },
              "restricted_delivery": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RestrictedDeliverySchema"
                }
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "is_paid_delivery": {
                "type": "boolean"
              },
              "default_image": {
                "readOnly": true,
                "description": "URL зображення товару",
                "example": "https://cdn.bm.parts/photos/oc47.jpg"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "position_total": {
            "type": "number"
          },
          "in_waiting": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingCartWaitingOthersSchema"
              }
            ]
          },
          "price": {
            "type": "number"
          },
          "quantity": {
            "nullable": true,
            "description": "Количество"
          },
          "weight": {
            "nullable": true,
            "description": "Вес"
          },
          "in_others": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingCartWaitingOthersSchema"
              }
            ]
          },
          "in_stocks": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartStockItemSchema"
            }
          }
        }
      },
      "ShoppingCartSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "object"
          },
          "total": {
            "type": "number"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "type": "string"
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "description": "Вес"
          },
          "currency_name": {
            "type": "string"
          },
          "products_count": {
            "type": "number",
            "nullable": true,
            "description": "КоличествоСтрок"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "maxLength": 50,
            "description": "Наименование"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartProductSchema"
            }
          },
          "uuid": {
            "type": "string",
            "maxLength": 36,
            "description": "ИД"
          }
        }
      },
      "ShoppingAddProductResponseSchema": {
        "type": "object",
        "properties": {
          "position_quantity": {
            "type": "integer",
            "example": 2
          },
          "position_total": {
            "type": "number",
            "example": 651.0
          },
          "previous_quantity": {
            "type": "integer",
            "nullable": true,
            "example": 0
          },
          "success": {
            "type": "boolean",
            "example": true
          },
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema"
          }
        }
      },
      "ShoppingBatchAddProductsResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema"
          },
          "error_rows": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ShoppingCartChangeOwnerRequestSchema": {
        "type": "object",
        "properties": {
          "client_uuid": {
            "type": "string",
            "description": "UUID нового власника (клієнта)"
          },
          "cart_uuid": {
            "type": "string",
            "description": "UUID кошика"
          }
        },
        "required": [
          "cart_uuid",
          "client_uuid"
        ]
      },
      "ShoppingCartCountResponseSchema": {
        "type": "object",
        "properties": {
          "carts_count": {
            "type": "integer",
            "description": "Кількість кошиків користувача",
            "example": 3
          }
        },
        "required": [
          "carts_count"
        ]
      },
      "ShoppingCartCreateProductItemSchema": {
        "type": "object",
        "properties": {
          "qnt": {
            "type": "integer",
            "description": "Кількість"
          },
          "uuid": {
            "type": "string",
            "description": "UUID товару"
          }
        },
        "required": [
          "qnt",
          "uuid"
        ]
      },
      "ShoppingCartCreateRequestSchema": {
        "type": "object",
        "properties": {
          "warehouse": {
            "type": "string",
            "description": "UUID складу"
          },
          "comment": {
            "type": "string",
            "maxLength": 500,
            "description": "Коментар до кошика"
          },
          "client_uuid": {
            "type": "string",
            "description": "UUID пов'язаного контрагента"
          },
          "name": {
            "type": "string",
            "description": "Назва кошика"
          },
          "products": {
            "description": "Товари для додавання при створенні",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartCreateProductItemSchema"
            }
          },
          "contract_uuid": {
            "type": "string",
            "description": "UUID договору"
          }
        }
      },
      "ShoppingCartCreateResponseSchema": {
        "type": "object",
        "properties": {
          "carts": {
            "$ref": "#/components/schemas/ShoppingCartSchema"
          }
        }
      },
      "ShoppingCartDetailResponseSchema": {
        "type": "object",
        "properties": {
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema"
          },
          "headers": {
            "type": "array",
            "description": "Заголовки колонок залишків",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ShoppingCartProductSchema2": {
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "properties": {
              "brand": {
                "$ref": "#/components/schemas/BrandNestedSchema"
              },
              "multiplicity": {
                "readOnly": true
              },
              "restricted_delivery": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RestrictedDeliverySchema"
                }
              },
              "article": {
                "nullable": true,
                "description": "Артикул"
              },
              "is_paid_delivery": {
                "type": "boolean"
              },
              "default_image": {
                "readOnly": true,
                "description": "URL зображення товару",
                "example": "https://cdn.bm.parts/photos/oc47.jpg"
              },
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16
              }
            },
            "required": [
              "uuid"
            ]
          },
          "position_total": {
            "type": "number"
          },
          "in_waiting": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingCartWaitingOthersSchema"
              }
            ]
          },
          "price": {
            "type": "number"
          },
          "quantity": {
            "nullable": true,
            "description": "Количество"
          },
          "weight": {
            "nullable": true,
            "description": "Вес"
          },
          "in_others": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingCartWaitingOthersSchema"
              }
            ]
          },
          "in_stocks": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartStockItemSchema"
            }
          }
        }
      },
      "ShoppingCartProductsItemSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string"
          },
          "sum": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "multiplicity": {
            "type": "integer"
          },
          "quantity": {
            "type": "integer"
          },
          "article": {
            "type": "string"
          },
          "in_stocks": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingCartProductsTotalSchema": {
        "type": "object",
        "properties": {
          "cart": {
            "type": "number",
            "example": 325.5
          },
          "warehouses": {
            "type": "object",
            "description": "Суми за складами (рядки)",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ShoppingCartProductsResponseSchema": {
        "type": "object",
        "properties": {
          "currency_name": {
            "type": "string",
            "example": "UAH"
          },
          "cart_products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartProductsItemSchema"
            }
          },
          "total": {
            "$ref": "#/components/schemas/ShoppingCartProductsTotalSchema"
          }
        }
      },
      "ShoppingCartReserveProductsRequestSchema": {
        "type": "object",
        "properties": {
          "reserves_uuid": {
            "type": "array",
            "description": "Список UUID замовлень/резервів",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "reserves_uuid"
        ]
      },
      "ShoppingCartSchema2": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "object"
          },
          "total": {
            "type": "number"
          },
          "warehouse": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "uuid": {
                "type": "string",
                "maxLength": 16,
                "description": "Уникальный идентификатор"
              }
            },
            "required": [
              "uuid"
            ]
          },
          "comment": {
            "type": "string"
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "description": "Вес"
          },
          "currency_name": {
            "type": "string"
          },
          "products_count": {
            "type": "number",
            "nullable": true,
            "description": "КоличествоСтрок"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "maxLength": 50,
            "description": "Наименование"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartProductSchema2"
            }
          },
          "uuid": {
            "type": "string",
            "maxLength": 36,
            "description": "ИД"
          }
        }
      },
      "ShoppingCartUpdateResponseSchema": {
        "type": "object",
        "properties": {
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema2"
          },
          "updated": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "ShoppingCartsListResponseSchema": {
        "type": "object",
        "properties": {
          "carts": {
            "description": "Список кошиків користувача",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartSchema2"
            }
          }
        }
      },
      "ShoppingChangeProductResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema2"
          }
        }
      },
      "ShoppingDeleteProductResponseSchema": {
        "type": "object",
        "properties": {
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema2"
          }
        }
      },
      "ShoppingImportEmptyFileResponseSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Файл з товарами не може бути порожнім"
          },
          "error": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "ShoppingTableRowCellSchema": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "example": "OC47"
          },
          "col_index": {
            "type": "integer",
            "example": 0
          }
        }
      },
      "ShoppingTableRowSchema": {
        "type": "object",
        "properties": {
          "row": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingTableRowCellSchema"
            }
          },
          "row_index": {
            "type": "integer",
            "example": 1
          }
        }
      },
      "ShoppingImportFromExcelResponseSchema": {
        "type": "object",
        "properties": {
          "err_rows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "error": {
            "type": "boolean",
            "example": false
          },
          "cart_uuid": {
            "type": "string",
            "nullable": true
          },
          "err_file": {
            "type": "string",
            "nullable": true
          },
          "success_rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingTableRowSchema"
            }
          }
        }
      },
      "ShoppingImportSettingsListResponseSchema": {
        "type": "object",
        "properties": {
          "settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportSettingsSchema"
            }
          }
        }
      },
      "ShoppingImportTypeSchema": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "object"
          },
          "name": {
            "type": "string",
            "example": "Артикул-Бренд-Кількість"
          },
          "import_type": {
            "type": "string",
            "example": "article"
          }
        }
      },
      "ShoppingImportTemplateResponseSchema": {
        "type": "object",
        "properties": {
          "import_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingImportTypeSchema"
            }
          }
        }
      },
      "ShoppingProductInCartSchema": {
        "type": "object",
        "properties": {
          "article": {
            "type": "string"
          },
          "cart_name": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "brand_name": {
            "type": "string"
          }
        }
      },
      "ShoppingQuickProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "object"
          },
          "multiplicity": {
            "type": "integer"
          },
          "restricted_delivery": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "article": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          },
          "is_paid_delivery": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ShoppingProductInfoDataSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ShoppingQuickProductSchema"
          },
          "position_total": {
            "type": "string",
            "example": "651.00"
          },
          "in_cart": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingProductInCartSchema"
              }
            ]
          },
          "price": {
            "type": "string",
            "example": "325.50"
          },
          "quantity": {
            "type": "integer"
          },
          "weight": {
            "type": "number"
          },
          "currency_name": {
            "type": "string"
          }
        }
      },
      "ShoppingProductInfoResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ShoppingProductInfoDataSchema"
          }
        }
      },
      "ShoppingRemoveReservesResponseSchema": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": true
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ShoppingReserveAnalysisItemSchema": {
        "type": "object",
        "properties": {
          "planned": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "reserved": {
            "type": "integer"
          },
          "article": {
            "type": "string"
          },
          "brand_code": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "brand_name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReserveOwnerSchema": {
        "type": "object",
        "properties": {
          "f": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReserveOrderItemSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingReserveOwnerSchema"
              }
            ]
          },
          "sum": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "carrier": {
            "type": "string"
          },
          "delivery_date": {
            "type": "string",
            "nullable": true
          },
          "delivery_setting": {
            "type": "string",
            "nullable": true
          },
          "route": {
            "type": "string",
            "nullable": true
          },
          "automatically": {
            "type": "boolean"
          },
          "date": {
            "type": "string"
          },
          "route_date": {
            "type": "string",
            "nullable": true
          },
          "shipping_date": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string"
          },
          "countrecord": {
            "type": "integer"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingSavedUnshippedSchema": {
        "type": "object",
        "properties": {
          "position_quantity": {
            "type": "integer"
          },
          "sum": {
            "type": "number"
          },
          "currency_name": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReserveOrderResponseSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingReserveOwnerSchema"
              }
            ]
          },
          "download_unreserved": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "analysis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReserveAnalysisItemSchema"
            }
          },
          "saved_unshipped": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ShoppingSavedUnshippedSchema"
              }
            ]
          },
          "result": {
            "type": "boolean",
            "example": true
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReserveOwnerSchema2": {
        "type": "object",
        "properties": {
          "f": {
            "type": "integer",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReserveWarehouseSchema": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReserveOrderItemSchema"
            }
          },
          "can_edit_delivery": {
            "type": "boolean",
            "description": "Чи можна змінювати доставку (гілка picking)"
          },
          "warehouse_name": {
            "type": "string"
          },
          "warehouse_code": {
            "type": "string"
          },
          "warehouse_uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReservedOrderWarehouseSchema": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReservedOrderProductSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string"
          },
          "sum": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "multiplicity": {
            "type": "integer",
            "nullable": true
          },
          "restricted_delivery": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "code": {
            "type": "string"
          },
          "article": {
            "type": "string"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          },
          "is_paid_delivery": {
            "type": "boolean"
          },
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReservedOrderDetailedSchema": {
        "type": "object",
        "properties": {
          "owner": {
            "$ref": "#/components/schemas/ShoppingReserveOwnerSchema2"
          },
          "sum": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "can_edit_delivery": {
            "type": "boolean"
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "carrier": {
            "type": "string"
          },
          "delivery_date": {
            "type": "string",
            "nullable": true
          },
          "delivery_setting": {
            "type": "string",
            "nullable": true
          },
          "warehouse": {
            "$ref": "#/components/schemas/ShoppingReservedOrderWarehouseSchema"
          },
          "route": {
            "type": "string",
            "nullable": true
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "description": "Вага резерву",
            "example": 0.1
          },
          "date": {
            "type": "string"
          },
          "route_date": {
            "type": "string",
            "nullable": true
          },
          "shipping_date": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "string"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReservedOrderProductSchema"
            }
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ShoppingReservedProductsResponseSchema": {
        "type": "object",
        "properties": {
          "reserved_products": {
            "description": "Деталізовані замовлення/резерви з товарами",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReservedOrderDetailedSchema"
            }
          }
        }
      },
      "ShoppingReservesListResponseSchema": {
        "type": "object",
        "properties": {
          "picking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReserveWarehouseSchema"
            }
          },
          "reserves": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingReserveWarehouseSchema"
            }
          }
        }
      },
      "ShoppingSaveImportSettingsResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "setting": {
            "$ref": "#/components/schemas/ImportSettingsSchema"
          }
        }
      },
      "ShoppingSuccessMessageResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Товар успішно додано до списку бажань."
          }
        },
        "required": [
          "success"
        ]
      },
      "ShoppingSuccessResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "success"
        ]
      },
      "ShoppingTablePreloadResponseSchema": {
        "type": "object",
        "properties": {
          "table": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingTableRowSchema"
            }
          }
        }
      },
      "ShoppingUnionCartsResponseSchema": {
        "type": "object",
        "properties": {
          "cart": {
            "$ref": "#/components/schemas/ShoppingCartSchema2"
          }
        }
      },
      "WishlistProductBrandSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "WishlistProductInnerSchema": {
        "type": "object",
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/WishlistProductBrandSchema"
          },
          "in_cart": {
            "type": "object",
            "nullable": true
          },
          "price": {
            "type": "string"
          },
          "multiplicity": {
            "type": "integer"
          },
          "weight": {
            "type": "number"
          },
          "currency_name": {
            "type": "string"
          },
          "restricted_delivery": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object"
            }
          },
          "article": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          },
          "is_paid_delivery": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "default_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WishlistStockItemSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "WishlistProductItemSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/WishlistProductInnerSchema"
          },
          "in_others": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WishlistStockItemSchema"
              }
            ]
          },
          "in_stocks": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WishlistStockItemSchema"
            }
          },
          "in_waiting": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WishlistStockItemSchema"
              }
            ]
          }
        }
      },
      "WishlistDataSchema": {
        "type": "object",
        "properties": {
          "products_count": {
            "type": "integer"
          },
          "products": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WishlistProductItemSchema"
            }
          }
        }
      },
      "WishlistDeleteProductsRequestSchema": {
        "type": "object",
        "properties": {
          "product_uuids": {
            "type": "array",
            "description": "Список UUID товарів для видалення",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "product_uuids"
        ]
      },
      "WishlistResponseSchema": {
        "type": "object",
        "properties": {
          "wishlist": {
            "$ref": "#/components/schemas/WishlistDataSchema"
          }
        }
      },
      "TrainingActionResponseSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Учасника успішно зареєстровано"
          }
        },
        "required": [
          "message",
          "success"
        ]
      },
      "TrainingParticipantItemSchema": {
        "type": "object",
        "properties": {
          "position": {
            "type": "string",
            "example": "Менеджер"
          },
          "full_name": {
            "type": "string",
            "example": "Іван Петренко"
          },
          "surname": {
            "type": "string",
            "example": "Петренко"
          },
          "phone_number": {
            "type": "string",
            "example": "3806xxxxxx12"
          },
          "company": {
            "type": "string",
            "example": "ТОВ Приклад"
          },
          "key": {
            "type": "string",
            "example": "00000001"
          },
          "name": {
            "type": "string",
            "example": "Іван"
          }
        }
      },
      "TrainingDetailResponseSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "example": "Короткий опис тренінгу"
          },
          "image_url": {
            "type": "string",
            "example": "https://cdn.bm.parts/trainings/cover.jpg"
          },
          "body": {
            "type": "string",
            "example": "<p>Програма тренінгу</p>"
          },
          "places_are_limited": {
            "type": "boolean",
            "example": true
          },
          "check_in_before": {
            "type": "string",
            "example": "2026-08-31T18:00:00Z"
          },
          "location": {
            "type": "string",
            "example": "Київ, вул. Хрещатик 1"
          },
          "free_places": {
            "type": "integer",
            "example": 12
          },
          "participants": {
            "type": "array",
            "description": "Зареєстровані учасники поточного контрагента",
            "items": {
              "$ref": "#/components/schemas/TrainingParticipantItemSchema"
            }
          },
          "duration": {
            "type": "number",
            "example": 8.0
          },
          "icalendar_url": {
            "type": "string",
            "example": "https://api.bm.parts/trainings/A2D9EC97246EEB0B46877CB5803BFD99/iCalendar"
          },
          "begin_at": {
            "type": "string",
            "example": "2026-09-01T09:00:00Z"
          },
          "end_at": {
            "type": "string",
            "example": "2026-09-01T18:00:00Z"
          },
          "name": {
            "type": "string",
            "example": "Тренінг з продажів"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "begin_at",
          "end_at",
          "icalendar_url",
          "name",
          "participants",
          "uuid"
        ]
      },
      "TrainingListItemSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "example": "Короткий опис тренінгу"
          },
          "image_url": {
            "type": "string",
            "example": "https://cdn.bm.parts/trainings/cover.jpg"
          },
          "body": {
            "type": "string",
            "example": "<p>Програма тренінгу</p>"
          },
          "places_are_limited": {
            "type": "boolean",
            "example": true
          },
          "check_in_before": {
            "type": "string",
            "example": "2026-08-31T18:00:00Z"
          },
          "location": {
            "type": "string",
            "example": "Київ, вул. Хрещатик 1"
          },
          "free_places": {
            "type": "integer",
            "example": 12
          },
          "duration": {
            "type": "number",
            "example": 8.0
          },
          "begin_at": {
            "type": "string",
            "example": "2026-09-01T09:00:00Z"
          },
          "end_at": {
            "type": "string",
            "example": "2026-09-01T18:00:00Z"
          },
          "name": {
            "type": "string",
            "example": "Тренінг з продажів"
          },
          "uuid": {
            "type": "string",
            "example": "A2D9EC97246EEB0B46877CB5803BFD99"
          }
        },
        "required": [
          "begin_at",
          "end_at",
          "name",
          "uuid"
        ]
      },
      "TrainingsListResponseSchema": {
        "type": "object",
        "properties": {
          "trainings": {
            "description": "Список тренінгів",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrainingListItemSchema"
            }
          }
        },
        "required": [
          "trainings"
        ]
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Signed API access token (see login/token flow)"
      },
      "SessionToken": {
        "type": "apiKey",
        "in": "header",
        "name": "BM-X-Token",
        "description": "Optional session identifier for web clients"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.bm.parts/",
      "description": "Current environment"
    }
  ],
  "tags": [
    {
      "name": "Advertising",
      "description": "Промо-матеріали, банери, рекламні акції та спеціальні пропозиції."
    },
    {
      "name": "Brands",
      "description": "Управління брендами та виробниками автозапчастин, отримання списків вузлів, підвузлів та крос-документів."
    },
    {
      "name": "CDN",
      "description": "Завантаження та отримання медіа-файлів, зображень товарів та документів."
    },
    {
      "name": "Catalog",
      "description": "Пошук та навігація по каталогу номенклатури, категоріях товарів та групах аналогів."
    },
    {
      "name": "Claims",
      "description": "Оформлення та супровід гарантійних випадків, рекламацій і претензій по товарам."
    },
    {
      "name": "Company",
      "description": "Дані про компанію клієнта, реквізити, торгові точки та підрозділи."
    },
    {
      "name": "Complaints",
      "description": "Подання та розгляд скарг і нештатних ситуацій."
    },
    {
      "name": "Couriers",
      "description": "Інформація про кур'єрські служби, маршрути та відстеження доставок."
    },
    {
      "name": "Delivery",
      "description": "Способи та графіки доставки, точки видачі, розрахунок варіантів відвантаження."
    },
    {
      "name": "Documents",
      "description": "Первинні документи, видаткові накладні, рахунки-фактури, товарно-транспортні накладні."
    },
    {
      "name": "Finance",
      "description": "Фінансова інформація контрагента, стан балансу, договори, акти звірки та взаєморозрахунки."
    },
    {
      "name": "Garage",
      "description": "Персональний гараж автомобілів клієнта, збережені авто та підбір запчастин."
    },
    {
      "name": "Lists",
      "description": "Персональні списки обраних товарів, закладок та шаблонів замовлень."
    },
    {
      "name": "News",
      "description": "Новини компанії, важливі оголошення, акційні пропозиції та оновлення."
    },
    {
      "name": "Prices",
      "description": "Типи цін, індивідуальні знижки, прайс-листи та валютні курси."
    },
    {
      "name": "Processing",
      "description": "Обробка замовлень, статуси виконання, формування та резервування."
    },
    {
      "name": "Product",
      "description": "Детальна інформація про товари, специфікації, залишки на складах та супутні матеріали."
    },
    {
      "name": "Profile",
      "description": "Профіль клієнта, персональні налаштування, контактні особи та доступні компанії."
    },
    {
      "name": "Reports",
      "description": "Формування аналітичних звітів по замовленнях, продажах та взаєморозрахунках."
    },
    {
      "name": "Return Products",
      "description": "Створення та відстеження актів повернення товарних позицій."
    },
    {
      "name": "Returns",
      "description": "Заявки на повернення товарів, правила та умови повернення номенклатури."
    },
    {
      "name": "Search",
      "description": "Глобальний пошук номенклатури, артикулів, оригінальних номерів (OE) та взаємозамінних аналогів."
    },
    {
      "name": "Shopping Cart",
      "description": "Управління кошиком замовлень, додавання товарів, перевірка наявності та оформлення замовлення."
    },
    {
      "name": "Trainings",
      "description": "Навчальні матеріали, вебінари та технічні тренінги від виробників."
    }
  ]
}
