{
  "openapi": "3.1.0",
  "info": {
    "title": "Gigma API",
    "version": "2026-08-15",
    "description": "Документация Gigma: общие правила API, сайты и приложения, управление бизнесом, каталоги, заказы, подписки и интеграции.\n\nСпецификация формируется из карточек endpoint и служит машиночитаемым справочником.\nОна не угадывает ID динамических справочников и не выводит 201/204 только из HTTP-метода.\nПеред реализацией сценария прочитайте правила API и связанную доменную страницу.",
    "contact": {
      "url": "https://docs.gigma.ru"
    }
  },
  "externalDocs": {
    "description": "Правила работы с Gigma API",
    "url": "https://docs.gigma.ru/conventions/"
  },
  "servers": [
    {
      "url": "https://api.gigma.ru",
      "description": "Production; paths уже содержат /api"
    }
  ],
  "paths": {
    "/api/counterparty/session/heartbeat": {
      "post": {
        "summary": "Обновление активности клиентской сессии",
        "operationId": "counterparty-session-heartbeat",
        "tags": [
          "Сайты и приложения / Heartbeat клиентской сессии"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 154,
                          "description": "идентификатор сессии."
                        },
                        "status": {
                          "type": "string",
                          "example": "active",
                          "description": "состояние сессии; успешный heartbeat возвращает `active`."
                        },
                        "started_at": {
                          "type": "string",
                          "example": "2026-07-30T03:00:00+00:00",
                          "format": "date-time",
                          "description": "время начала сессии в ISO 8601."
                        },
                        "last_seen_at": {
                          "type": "string",
                          "example": "2026-07-30T03:02:00+00:00",
                          "format": "date-time",
                          "description": "время последней активности в ISO 8601."
                        },
                        "duration_seconds": {
                          "type": "integer",
                          "example": 120,
                          "description": "активное время в секундах."
                        }
                      }
                    },
                    "server_time": {
                      "type": "string",
                      "example": "2026-07-30T03:02:00+00:00",
                      "format": "date-time",
                      "description": "время сервера в ISO 8601."
                    },
                    "next_heartbeat_in_seconds": {
                      "type": "integer",
                      "example": 60,
                      "description": "рекомендуемая задержка до следующего запроса."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Интеграция через backend/heartbeat/#counterparty-session-heartbeat"
        }
      }
    },
    "/api/counterparty/auth/introspect": {
      "post": {
        "summary": "Проверка Counterparty Bearer",
        "operationId": "counterparty-auth-introspect",
        "tags": [
          "Сайты и приложения / Проверка Bearer-токена"
        ],
        "parameters": [],
        "security": [
          {
            "counterpartyAuthClientBasic": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "active": {
                      "type": "boolean",
                      "example": true,
                      "description": "результат проверки Bearer."
                    },
                    "principal_handle": {
                      "type": "string",
                      "example": "0f1c1f8e-7a64-4c7a-9c10-1dd25edc54d0",
                      "description": "стабильный UUID клиента для связи с пользователем вашей системы."
                    },
                    "project": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 12,
                          "description": "идентификатор проекта Gigma."
                        }
                      }
                    },
                    "application": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 34,
                          "description": "идентификатор приложения, выпустившего Bearer."
                        },
                        "name": {
                          "type": "string",
                          "example": "Личный кабинет",
                          "description": "название приложения."
                        }
                      }
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "chat:access",
                        "description": "разрешения backend-клиента."
                      },
                      "description": "разрешения backend-клиента."
                    },
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "2026-07-31T03:00:00+00:00",
                      "format": "date-time",
                      "description": "время окончания Bearer или `null`."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Интеграция через backend/introspect/#counterparty-auth-introspect"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Bearer целиком, включая разделитель `|`."
                  },
                  "audience": {
                    "type": "string",
                    "description": "значение, выданное вместе с credentials."
                  }
                },
                "required": [
                  "token",
                  "audience"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/send_password": {
      "post": {
        "summary": "Запрос одноразового кода",
        "operationId": "send-password",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Password successfully send"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#send-password"
        },
        "description": "Создаёт или находит клиента внутри проекта текущей витрины и отправляет одноразовый код: звонком на телефон или письмом на email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "телефон или email клиента. Для телефона используйте нормализованный формат `7XXXXXXXXXX`."
                  }
                },
                "required": [
                  "phone"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/login": {
      "post": {
        "summary": "Вход по одноразовому коду",
        "operationId": "login",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-23T10:27:06.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "avatar": {
                          "example": null
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Викторович"
                        },
                        "birthday": {
                          "type": "string",
                          "example": "1980-04-02",
                          "format": "date"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, Новосибирская область, город Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "phone_2": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "email": {
                          "type": "string",
                          "example": "user@example.test"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-22T14:01:37.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-03-23T10:48:33.000000Z",
                          "format": "date-time"
                        },
                        "favourite_products": {
                          "type": "array",
                          "items": {}
                        },
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "<opaque_token>"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#login"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "телефон в цифровом формате или email, на который запрашивался код."
                  },
                  "password": {
                    "type": "string",
                    "example": "<secret>",
                    "description": "одноразовый код из звонка или письма."
                  },
                  "device": {
                    "type": "string",
                    "example": "storefront-web"
                  }
                },
                "required": [
                  "phone",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/miniapps/{provider}/contact_auth": {
      "post": {
        "summary": "Авторизация miniapp по подписанному контакту",
        "operationId": "miniapp-contact-auth",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "description": "маршрут принимает `max` или `telegram`. Подписанный вход по контакту сейчас поддерживает `max`; для Telegram без подтверждения владения телефоном backend возвращает `422`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "<opaque_token>"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#miniapp-contact-auth"
        },
        "description": "Используется, когда miniapp получил у провайдера подписанное подтверждение контакта клиента. В ответе выдаётся обычный `counterparty.access_token.value` для дальнейшей работы с API Gigma. Канонический маршрут находится в counterparty-контуре. Не используйте alias URL вида `/api/miniapps/.../auth/...`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "телефон из подписанного contact payload. Backend нормализует его к `7XXXXXXXXXX`."
                  },
                  "auth_date": {
                    "type": "integer",
                    "example": 1780000000,
                    "description": "время подписи Unix в секундах, миллисекундах или микросекундах; значение не должно быть из будущего или старше настроенного TTL."
                  },
                  "hash": {
                    "type": "string",
                    "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
                    "description": "подпись contact payload, 64 hex-символа."
                  },
                  "init_data": {
                    "type": "string",
                    "example": "auth_date=1780000000&user=%7B%22id%22%3A123456%7D&hash=...",
                    "description": "подписанные init data miniapp."
                  },
                  "device": {
                    "type": "string",
                    "example": "max-miniapp",
                    "description": "имя устройства для токена, например `max-miniapp`."
                  }
                },
                "required": [
                  "phone",
                  "auth_date",
                  "hash",
                  "init_data",
                  "device"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/callback_auth/init": {
      "post": {
        "summary": "Инициализация callback-авторизации",
        "operationId": "callback-auth-init",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_token": {
                      "type": "string",
                      "example": "<opaque_token>"
                    },
                    "callback_number": {
                      "type": "string",
                      "example": "79001000011"
                    },
                    "expires_at": {
                      "type": "string",
                      "example": "2026-07-03T01:23:45+00:00",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#callback-auth-init"
        },
        "description": "Создаёт callback-сессию и возвращает номер, на который клиент должен позвонить со своего телефона.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "телефон клиента. Backend нормализует значение к `7XXXXXXXXXX`."
                  },
                  "client_nonce": {
                    "type": "string",
                    "example": "R2xvYmFsTm9uY2VFeGFtcGxlMTIzNDU2Nzg5MA",
                    "description": "секрет текущей попытки входа, 32–128 символов base64url."
                  }
                },
                "required": [
                  "phone",
                  "client_nonce"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/callback_auth/status": {
      "post": {
        "summary": "Проверка статуса callback-авторизации",
        "operationId": "callback-auth-status",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "pending"
                    },
                    "expires_at": {
                      "type": "string",
                      "example": "2026-07-03T01:23:45+00:00",
                      "format": "date-time"
                    },
                    "server_time": {
                      "type": "string",
                      "example": "2026-07-03T01:20:10+00:00",
                      "format": "date-time"
                    },
                    "remaining_seconds": {
                      "type": "integer",
                      "example": 215
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#callback-auth-status"
        },
        "description": "Возвращает текущее состояние callback-сессии. Этот метод никогда не возвращает Bearer token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "значение из ответа `callback_auth/init`."
                  },
                  "client_nonce": {
                    "type": "string",
                    "example": "R2xvYmFsTm9uY2VFeGFtcGxlMTIzNDU2Nzg5MA",
                    "description": "значение, переданное в `callback_auth/init`."
                  }
                },
                "required": [
                  "session_token",
                  "client_nonce"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/callback_auth/exchange": {
      "post": {
        "summary": "Получение Bearer token после callback-звонка",
        "operationId": "callback-auth-exchange",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "example": "<opaque_token>"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "410": {
            "$ref": "#/components/responses/Gone"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#callback-auth-exchange"
        },
        "description": "Обменивает подтверждённую callback-сессию на Bearer token клиента.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "значение из ответа `callback_auth/init`."
                  },
                  "client_nonce": {
                    "type": "string",
                    "example": "R2xvYmFsTm9uY2VFeGFtcGxlMTIzNDU2Nzg5MA",
                    "description": "значение, переданное в `callback_auth/init`."
                  },
                  "device": {
                    "type": "string",
                    "example": "web",
                    "description": "название устройства или приложения для журнала сессий."
                  }
                },
                "required": [
                  "session_token",
                  "client_nonce"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/logout": {
      "post": {
        "summary": "Выход контрагента из системы",
        "operationId": "logout",
        "tags": [
          "Сайты и приложения / Вход клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "User successfully logout from all devices"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Авторизация/#logout"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_all_devices": {
                    "type": "boolean",
                    "example": true,
                    "description": "`true`, чтобы удалить все токены клиента; `false`, чтобы удалить только текущий токен."
                  }
                },
                "required": [
                  "from_all_devices"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty": {
      "get": {
        "summary": "Получение текущего клиента",
        "operationId": "get-counterparty",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница"
                            }
                          }
                        },
                        "manager": {
                          "example": null
                        },
                        "avatar": {
                          "example": null
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров"
                        },
                        "middle_name": {
                          "example": null
                        },
                        "birthday": {
                          "example": null
                        },
                        "address": {
                          "type": "string",
                          "example": "г Москва, ул Деловая, д 20"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "phone_2": {
                          "example": null
                        },
                        "email": {
                          "type": "string",
                          "example": "user@example.test"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-15T10:00:00+00:00",
                          "format": "date-time"
                        },
                        "registration_date": {
                          "type": "string",
                          "example": "2026-08-15T10:00:00+00:00",
                          "format": "date-time",
                          "description": "дата регистрации клиента; совпадает с created_at"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-08-16T10:00:00+00:00",
                          "format": "date-time"
                        },
                        "is_verified": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "example": false,
                          "description": "результат проверки клиента для текущего Application: true, false или null, если приложение определить нельзя"
                        },
                        "favourite_products": {
                          "type": "array",
                          "items": {},
                          "description": "краткие карточки избранного клиента."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#get-counterparty"
        }
      },
      "put": {
        "summary": "Обновление профиля",
        "operationId": "update-counterparty",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#update-counterparty"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Алексей",
                    "description": "имя, 2–255 символов;"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Петров",
                    "description": "фамилия, 2–255 символов;"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test",
                    "description": "электронная почта;"
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, ул Деловая, д 20",
                    "description": "адрес;"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "дополнительный контактный номер, до 20 символов."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление аккаунта клиента",
        "operationId": "delete-counterparty",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Counterparty successfully deleted"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#delete-counterparty"
        }
      }
    },
    "/api/counterparty/phone/request_change": {
      "post": {
        "summary": "Запрос кода на новый номер",
        "operationId": "phone-request-change",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Код подтверждения отправлен на указанный номер телефона."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#phone-request-change"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_phone_number": {
                    "type": "string",
                    "example": "+7 999 123-45-67",
                    "description": "новый основной номер телефона."
                  }
                },
                "required": [
                  "new_phone_number"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/phone/verify_change": {
      "post": {
        "summary": "Подтверждение нового номера",
        "operationId": "phone-verify-change",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#phone-verify-change"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "example": "<secret>",
                    "description": "четырёхзначный OTP."
                  }
                },
                "required": [
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/verifications/sbp-payment": {
      "post": {
        "summary": "Создание или получение СБП-проверки",
        "operationId": "counterparty-verification-sbp-payment",
        "tags": [
          "Сайты и приложения / Профиль клиента"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string",
                          "example": "sbp_payment",
                          "description": "способ проверки; для этого метода всегда `sbp_payment`."
                        },
                        "status": {
                          "type": "string",
                          "example": "pending",
                          "description": "состояние проверки: `pending`, `verified`, `failed` или `canceled`."
                        },
                        "is_verified": {
                          "type": "boolean",
                          "example": false,
                          "description": "`true`, когда проверочный платёж подтверждён."
                        },
                        "payment_link": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "https://yoomoney.ru/checkout/...",
                          "format": "uri",
                          "description": "ссылка на оплату или `null`, если переход больше не нужен."
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "2026-08-16T11:00:00.000000Z",
                          "format": "date-time",
                          "description": "время окончания действия платёжной ссылки в ISO 8601 или `null`."
                        },
                        "verified_at": {
                          "example": null,
                          "description": "время подтверждения клиента в ISO 8601 или `null`."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string",
                          "example": "sbp_payment",
                          "description": "способ проверки; для этого метода всегда `sbp_payment`."
                        },
                        "status": {
                          "type": "string",
                          "example": "pending",
                          "description": "состояние проверки: `pending`, `verified`, `failed` или `canceled`."
                        },
                        "is_verified": {
                          "type": "boolean",
                          "example": false,
                          "description": "`true`, когда проверочный платёж подтверждён."
                        },
                        "payment_link": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "https://yoomoney.ru/checkout/...",
                          "format": "uri",
                          "description": "ссылка на оплату или `null`, если переход больше не нужен."
                        },
                        "expires_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "2026-08-16T11:00:00.000000Z",
                          "format": "date-time",
                          "description": "время окончания действия платёжной ссылки в ISO 8601 или `null`."
                        },
                        "verified_at": {
                          "example": null,
                          "description": "время подтверждения клиента в ISO 8601 или `null`."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Контрагент (клиент)/#counterparty-verification-sbp-payment"
        }
      }
    },
    "/api/counterparty/subscription-catalog": {
      "get": {
        "summary": "Получение подписочного каталога",
        "operationId": "subscription-catalog",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 34780
                          },
                          "name": {
                            "type": "string",
                            "example": "Базовый"
                          },
                          "description": {
                            "type": "string",
                            "example": "Доступ к сервису"
                          },
                          "avatar_url": {
                            "example": null
                          },
                          "price": {
                            "type": "string",
                            "example": "490.00",
                            "format": "decimal"
                          },
                          "currency": {
                            "type": "string",
                            "example": "RUB"
                          },
                          "billing_period_months": {
                            "type": "integer",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#subscription-catalog"
        }
      }
    },
    "/api/counterparty/subscription-catalog/grouped": {
      "get": {
        "summary": "Получение всегда сгруппированного каталога",
        "operationId": "subscription-catalog-grouped",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 34780
                          },
                          "name": {
                            "type": "string",
                            "example": "Базовый"
                          },
                          "price": {
                            "type": "string",
                            "example": "490.00",
                            "format": "decimal"
                          },
                          "currency": {
                            "type": "string",
                            "example": "RUB"
                          },
                          "billing_period_months": {
                            "type": "integer",
                            "example": 1
                          },
                          "variants": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 34780
                                },
                                "label": {
                                  "type": "string",
                                  "example": "1 месяц"
                                },
                                "price": {
                                  "type": "string",
                                  "example": "490.00",
                                  "format": "decimal"
                                },
                                "currency": {
                                  "type": "string",
                                  "example": "RUB"
                                },
                                "billing_period_months": {
                                  "type": "integer",
                                  "example": 1
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#subscription-catalog-grouped"
        },
        "description": "Endpoint всегда возвращает группы с массивом `variants`, даже когда вариант у тарифа один. Поля и правила доступности совпадают с `subscription-catalog`."
      }
    },
    "/api/counterparty/subscription-plans": {
      "get": {
        "summary": "Получение плоских планов подписки",
        "operationId": "subscription-plans",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Базовый"
                          },
                          "slug": {
                            "type": "string",
                            "example": "nomenclature-34780"
                          },
                          "amount": {
                            "type": "integer",
                            "example": 490
                          },
                          "currency": {
                            "type": "string",
                            "example": "RUB"
                          },
                          "period_months": {
                            "type": "integer",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#subscription-plans"
        }
      }
    },
    "/api/counterparty/products": {
      "get": {
        "summary": "Получение списка товаров",
        "operationId": "products-list",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "description": "номер страницы, по умолчанию `1`;"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "description": "размер страницы, по умолчанию `10`;"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поиск по названию, 1–255 символов;"
            }
          },
          {
            "name": "category_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "категории; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/categories",
                  "/api/counterparty/categories"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "brand_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "бренды; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/brands",
                  "/api/counterparty/brands"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "country_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "страны; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/countries",
                  "/api/counterparty/countries"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tag_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "теги;"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "`name_asc`, `name_desc`, `popularity_asc`, `popularity_desc`, `price_asc` или `price_desc`;"
            }
          },
          {
            "name": "price_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "description": "нижняя граница цены, от `0`;"
            }
          },
          {
            "name": "price_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 1,
              "description": "верхняя граница цены, от `1`."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 26896
                              },
                              "views_count": {
                                "type": "integer",
                                "example": 23
                              },
                              "photo": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/product.png",
                                "format": "uri"
                              },
                              "photos": {
                                "type": "array",
                                "items": {}
                              },
                              "name": {
                                "type": "string",
                                "example": "Товар"
                              },
                              "brand": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 99
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Бренд"
                                  }
                                }
                              },
                              "old_price": {
                                "type": "string",
                                "example": "2450.00",
                                "format": "decimal"
                              },
                              "price": {
                                "type": "string",
                                "example": "1960.00",
                                "format": "decimal"
                              },
                              "discount": {
                                "type": "integer",
                                "example": 20
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 5
                              },
                              "unit": {
                                "example": null
                              },
                              "is_favourite": {
                                "type": "boolean",
                                "example": false
                              },
                              "tags": {
                                "type": "array",
                                "items": {}
                              },
                              "parameters": {
                                "type": "object",
                                "properties": {
                                  "wholesale": {
                                    "type": "boolean",
                                    "example": false
                                  },
                                  "pieces_per_pack": {
                                    "type": "integer",
                                    "example": 1
                                  },
                                  "quantity_pack": {
                                    "type": "integer",
                                    "example": 5
                                  }
                                }
                              }
                            }
                          }
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 20
                        },
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#products-list"
        }
      }
    },
    "/api/counterparty/products/{id}": {
      "get": {
        "summary": "Получение карточки товара",
        "operationId": "product-show",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 26896
                        },
                        "name": {
                          "type": "string",
                          "example": "Товар"
                        },
                        "description": {
                          "type": "string",
                          "example": "<p>Описание</p>"
                        },
                        "specification": {
                          "type": "string",
                          "example": "<p>Характеристики</p>"
                        },
                        "price": {
                          "type": "string",
                          "example": "1960.00",
                          "format": "decimal"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 5
                        },
                        "photos": {
                          "type": "array",
                          "items": {}
                        },
                        "is_favourite": {
                          "type": "boolean",
                          "example": false
                        },
                        "share_link": {
                          "example": null
                        },
                        "tags": {
                          "type": "array",
                          "items": {}
                        },
                        "parameters": {
                          "type": "object",
                          "properties": {
                            "wholesale": {
                              "type": "boolean",
                              "example": false
                            },
                            "pieces_per_pack": {
                              "type": "integer",
                              "example": 1
                            },
                            "quantity_pack": {
                              "type": "integer",
                              "example": 5
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#product-show"
        },
        "description": "Возвращает расширенную карточку: описание, характеристики, фотографии, цену, остаток, теги и параметры упаковки."
      }
    },
    "/api/counterparty/prices": {
      "get": {
        "summary": "Получение диапазона цен",
        "operationId": "prices",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поиск по названию, 1–255 символов;"
            }
          },
          {
            "name": "category_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "категории; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/categories",
                  "/api/counterparty/categories"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "brand_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "бренды; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/brands",
                  "/api/counterparty/brands"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "country_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "страны; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/countries",
                  "/api/counterparty/countries"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tag_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "теги;"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "`name_asc`, `name_desc`, `popularity_asc`, `popularity_desc`, `price_asc` или `price_desc`;"
            }
          },
          {
            "name": "price_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "description": "нижняя граница цены, от `0`;"
            }
          },
          {
            "name": "price_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 1,
              "description": "верхняя граница цены, от `1`."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "min_price": {
                      "type": "integer",
                      "example": 100
                    },
                    "max_price": {
                      "type": "integer",
                      "example": 10000
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#prices"
        }
      }
    },
    "/api/counterparty/products/favourites": {
      "get": {
        "summary": "Получение избранных товаров",
        "operationId": "favourites-list",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "description": "номер страницы, по умолчанию `1`;"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "description": "размер страницы, по умолчанию `10`."
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 26896
                              },
                              "name": {
                                "type": "string",
                                "example": "Товар"
                              },
                              "price": {
                                "type": "string",
                                "example": "1960.00",
                                "format": "decimal"
                              },
                              "is_favourite": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#favourites-list"
        }
      },
      "post": {
        "summary": "Добавление товара в избранное",
        "operationId": "favourites-add",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 26896
                        },
                        "name": {
                          "type": "string",
                          "example": "Товар"
                        },
                        "price": {
                          "type": "string",
                          "example": "1960.00",
                          "format": "decimal"
                        },
                        "is_favourite": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#favourites-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer",
                    "example": 26896,
                    "description": "ID существующего товара."
                  }
                },
                "required": [
                  "product_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/products/favourites/{product_id}": {
      "get": {
        "summary": "Получение карточки товара через маршрут избранного",
        "operationId": "favourites-show",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 26896
                        },
                        "name": {
                          "type": "string",
                          "example": "Товар"
                        },
                        "price": {
                          "type": "string",
                          "example": "1960.00",
                          "format": "decimal"
                        },
                        "is_favourite": {
                          "type": "boolean",
                          "example": false
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#favourites-show"
        },
        "description": "Текущий runtime возвращает карточку товара по ID, но **не проверяет**, находится ли товар в избранном текущего клиента. Для обычной карточки используйте `GET /api/counterparty/products/{id}`, а принадлежность избранному определяйте по списку `GET /api/counterparty/products/favourites`."
      },
      "delete": {
        "summary": "Удаление товара из избранного",
        "operationId": "favourites-remove",
        "tags": [
          "Сайты и приложения / Каталог, тарифы и цены"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Product successfully deleted from favourites"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Товары/#favourites-remove"
        },
        "description": "В path передаётся ID товара, а не ID записи избранного."
      }
    },
    "/api/counterparty/orders/precalculate": {
      "post": {
        "summary": "Предварительный расчёт корзины",
        "operationId": "orders-precalculate",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price": {
                      "type": "number",
                      "example": 1952.4
                    },
                    "discount": {
                      "type": "number",
                      "example": 195.24
                    },
                    "total": {
                      "type": "number",
                      "example": 1657.16
                    },
                    "quantity_pack": {
                      "type": "integer",
                      "example": 3
                    },
                    "original_price": {
                      "type": "number",
                      "example": 1952.4
                    },
                    "product_discount_amount": {
                      "type": "number",
                      "example": 195.24
                    },
                    "promo_discount_amount": {
                      "type": "integer",
                      "example": 100
                    },
                    "total_discount_amount": {
                      "type": "number",
                      "example": 295.24
                    },
                    "final_price": {
                      "type": "number",
                      "example": 1657.16
                    },
                    "applied_discount": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 7
                        },
                        "code": {
                          "type": "string",
                          "example": "WELCOME-10"
                        },
                        "name": {
                          "type": "string",
                          "example": "Приветственная скидка"
                        },
                        "type": {
                          "type": "string",
                          "example": "fixed"
                        },
                        "value": {
                          "type": "integer",
                          "example": 100
                        }
                      }
                    },
                    "discount_error": {
                      "example": null
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 28504
                          },
                          "price": {
                            "type": "number",
                            "example": 650.8
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 3
                          },
                          "pieces_per_pack": {
                            "type": "integer",
                            "example": 1
                          },
                          "quantity_pack": {
                            "type": "integer",
                            "example": 3
                          },
                          "wholesale": {
                            "type": "boolean",
                            "example": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#orders-precalculate"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 28504,
                          "description": "ID товара;"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 3,
                          "description": "количество, от `1`;"
                        }
                      },
                      "required": [
                        "id",
                        "quantity"
                      ],
                      "description": "позиции корзины;"
                    },
                    "description": "позиции корзины;"
                  },
                  "promo_code": {
                    "type": "string",
                    "example": "WELCOME-10",
                    "description": "латинские буквы, цифры и дефис, до 64 символов."
                  }
                },
                "required": [
                  "products"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/orders": {
      "post": {
        "summary": "Создание заказа",
        "operationId": "create-order",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 169
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Ожидает оплаты"
                            }
                          }
                        },
                        "price": {
                          "type": "string",
                          "example": "1657.16",
                          "format": "decimal"
                        },
                        "promo_code": {
                          "type": "string",
                          "example": "WELCOME-10"
                        },
                        "original_price": {
                          "type": "number",
                          "example": 1952.4
                        },
                        "product_discount_amount": {
                          "type": "number",
                          "example": 195.24
                        },
                        "promo_discount_amount": {
                          "type": "integer",
                          "example": 100
                        },
                        "total_discount_amount": {
                          "type": "number",
                          "example": 295.24
                        },
                        "final_price": {
                          "type": "number",
                          "example": 1657.16
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {}
                        },
                        "delivery_subtype": {
                          "type": "object",
                          "properties": {}
                        },
                        "delivery_subtype_param": {
                          "example": null
                        },
                        "payment_type": {
                          "type": "object",
                          "properties": {}
                        },
                        "yookassa_payment_method_type": {
                          "example": null
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, ул Деловая, д 20"
                        },
                        "shop": {
                          "example": null
                        },
                        "products": {
                          "type": "array",
                          "items": {}
                        },
                        "payment_link": {
                          "type": "string",
                          "example": "https://yoomoney.ru/checkout/...",
                          "format": "uri"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-16T10:00:00+00:00",
                          "format": "date-time"
                        },
                        "redeem_token": {
                          "example": null
                        },
                        "redeemed_count": {
                          "type": "integer",
                          "example": 0
                        },
                        "total_tickets": {
                          "type": "integer",
                          "example": 0
                        },
                        "last_redeemed_at": {
                          "example": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#create-order"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "способ доставки; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/delivery_types",
                        "/api/counterparty/delivery_types"
                      ]
                    }
                  },
                  "delivery_subtype_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "требуется при `delivery_type_id = 2`;"
                  },
                  "payment_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "способ оплаты; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/counterparty/payment_types"
                      ]
                    }
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, ул Деловая, д 20",
                    "description": "требуется при `delivery_subtype_id = 2`;"
                  },
                  "promo_code": {
                    "type": "string",
                    "example": "WELCOME-10",
                    "description": "промокод;"
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 28504,
                          "description": "ID товара;"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 3,
                          "description": "количество, от `1`."
                        }
                      },
                      "required": [
                        "id",
                        "quantity"
                      ],
                      "description": "позиции корзины;"
                    },
                    "description": "позиции корзины;"
                  }
                },
                "required": [
                  "delivery_type_id",
                  "delivery_subtype_id",
                  "address",
                  "products"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получение заказов клиента",
        "operationId": "orders-list",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 169
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Ожидает оплаты"
                              }
                            }
                          },
                          "final_price": {
                            "type": "number",
                            "example": 1657.16
                          },
                          "payment_link": {
                            "type": "string",
                            "example": "https://yoomoney.ru/checkout/...",
                            "format": "uri"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-16T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "ordersCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#orders-list"
        },
        "description": "Возвращает только заказы текущего клиента в текущем `Application`."
      }
    },
    "/api/counterparty/orders/{id}": {
      "get": {
        "summary": "Получение одного заказа",
        "operationId": "get-order",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 169
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Ожидает оплаты"
                            }
                          }
                        },
                        "final_price": {
                          "type": "number",
                          "example": 1657.16
                        },
                        "payment_link": {
                          "type": "string",
                          "example": "https://yoomoney.ru/checkout/...",
                          "format": "uri"
                        },
                        "redeem_token": {
                          "example": null
                        },
                        "redeemed_count": {
                          "type": "integer",
                          "example": 0
                        },
                        "total_tickets": {
                          "type": "integer",
                          "example": 0
                        },
                        "last_redeemed_at": {
                          "example": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#get-order"
        },
        "description": "Backend проверяет и владельца, и `Application`. Чужой заказ или заказ другого приложения возвращается как `404`, чтобы не раскрывать его существование. Для билетов и пропусков ответ может содержать `redeem_token`, `redeemed_count`, `total_tickets` и `last_redeemed_at`. Эти поля возвращаются только владельцу заказа."
      }
    },
    "/api/counterparty/contact_form": {
      "post": {
        "summary": "Создание заказа из контактной формы",
        "operationId": "contact-form-order",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#contact-form-order"
        },
        "description": "Этот endpoint создаёт клиента и заказ без предварительного входа. Используйте его только для простой контактной формы, а не как основной checkout: runtime фиксирует курьерскую доставку и не поддерживает полный набор условий обычного заказа.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Иван",
                    "description": "имя клиента;"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Иванов",
                    "description": "фамилия клиента;"
                  },
                  "middle_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": null,
                    "description": "отчество;"
                  },
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "телефон клиента;"
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, ул Деловая, д 20",
                    "description": "адрес;"
                  },
                  "payment_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "способ оплаты; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/counterparty/payment_types"
                      ]
                    }
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 28504,
                          "description": "ID товара;"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "description": "количество."
                        }
                      },
                      "required": [
                        "id",
                        "quantity"
                      ],
                      "description": "позиции заказа;"
                    },
                    "description": "позиции заказа;"
                  }
                },
                "required": [
                  "first_name",
                  "last_name",
                  "phone",
                  "address",
                  "payment_type_id",
                  "products"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions/checkout": {
      "post": {
        "summary": "Создание checkout подписки",
        "operationId": "subscription-checkout",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "integer",
                      "example": 501
                    },
                    "nomenclature_id": {
                      "type": "integer",
                      "example": 34780
                    },
                    "amount": {
                      "type": "string",
                      "example": "490.00",
                      "format": "decimal"
                    },
                    "currency": {
                      "type": "string",
                      "example": "RUB"
                    },
                    "billing_period_months": {
                      "type": "integer",
                      "example": 1
                    },
                    "payment_method_type": {
                      "type": "string",
                      "example": "bank_card"
                    },
                    "payment_link": {
                      "type": "string",
                      "example": "https://yoomoney.ru/checkout/...",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "integer",
                      "example": 501
                    },
                    "nomenclature_id": {
                      "type": "integer",
                      "example": 34780
                    },
                    "amount": {
                      "type": "string",
                      "example": "490.00",
                      "format": "decimal"
                    },
                    "currency": {
                      "type": "string",
                      "example": "RUB"
                    },
                    "billing_period_months": {
                      "type": "integer",
                      "example": 1
                    },
                    "payment_method_type": {
                      "type": "string",
                      "example": "bank_card"
                    },
                    "payment_link": {
                      "type": "string",
                      "example": "https://yoomoney.ru/checkout/...",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "integer",
                      "example": 501
                    },
                    "nomenclature_id": {
                      "type": "integer",
                      "example": 34780
                    },
                    "amount": {
                      "type": "string",
                      "example": "490.00",
                      "format": "decimal"
                    },
                    "currency": {
                      "type": "string",
                      "example": "RUB"
                    },
                    "billing_period_months": {
                      "type": "integer",
                      "example": 1
                    },
                    "payment_method_type": {
                      "type": "string",
                      "example": "bank_card"
                    },
                    "payment_link": {
                      "type": "string",
                      "example": "https://yoomoney.ru/checkout/...",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-checkout"
        },
        "description": "Передайте ровно одно поле: `nomenclature_id` или `nomenclature_ids`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 34780,
                    "description": "один тариф;"
                  },
                  "autopay_consent": {
                    "type": "boolean",
                    "example": true,
                    "description": "должно быть `true`;"
                  }
                },
                "required": [
                  "nomenclature_id",
                  "autopay_consent"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions": {
      "get": {
        "summary": "Получение подписок клиента",
        "operationId": "subscriptions-list",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 42
                          },
                          "application_id": {
                            "type": "integer",
                            "example": 17,
                            "description": "Приложение. Актуальные значения получите из справочника.",
                            "x-gigma-dictionary": {
                              "dynamic": true,
                              "paths": [
                                "/api/applications"
                              ]
                            }
                          },
                          "plan_slug": {
                            "type": "string",
                            "example": "nomenclature-34780"
                          },
                          "nomenclature_id": {
                            "type": "integer",
                            "example": 34780
                          },
                          "billing_period_months": {
                            "type": "integer",
                            "example": 1
                          },
                          "amount": {
                            "type": "string",
                            "example": "490.00",
                            "format": "decimal"
                          },
                          "currency": {
                            "type": "string",
                            "example": "RUB"
                          },
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "current_period_start": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          },
                          "current_period_end": {
                            "type": "string",
                            "example": "2026-09-15T10:00:00+00:00",
                            "format": "date-time"
                          },
                          "next_charge_at": {
                            "type": "string",
                            "example": "2026-09-15T10:00:00+00:00",
                            "format": "date-time"
                          },
                          "latest_payment": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "example": "succeeded"
                              }
                            }
                          },
                          "can_retry_payment": {
                            "type": "boolean",
                            "example": false
                          },
                          "retry_payment_reason": {
                            "type": "string",
                            "example": "already_paid"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscriptions-list"
        }
      },
      "post": {
        "summary": "Создание подписки с немедленным списанием",
        "operationId": "subscription-create",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "202": {
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-create"
        },
        "description": "Используйте endpoint только когда у клиента уже есть активный `saved_payment_method_id` текущего `Application`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 34780,
                    "description": "ID тарифа;"
                  },
                  "saved_payment_method_id": {
                    "type": "integer",
                    "example": 9,
                    "description": "сохранённый способ оплаты;"
                  },
                  "autopay_consent": {
                    "type": "boolean",
                    "example": true,
                    "description": "должно быть `true`."
                  }
                },
                "required": [
                  "nomenclature_id",
                  "saved_payment_method_id",
                  "autopay_consent"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions/{id}": {
      "patch": {
        "summary": "Изменение тарифа или сохранённого способа оплаты",
        "operationId": "subscription-update",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 34786,
                    "description": "новый тариф;"
                  },
                  "autopay_consent": {
                    "type": "boolean",
                    "example": true,
                    "description": "передайте `true`, если меняются тариф, цена, период или способ оплаты."
                  }
                },
                "required": [
                  "autopay_consent"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/cancel": {
      "post": {
        "summary": "Отмена подписки",
        "operationId": "subscription-cancel",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-cancel"
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/resume": {
      "post": {
        "summary": "Возобновление отменённой подписки",
        "operationId": "subscription-resume",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-resume"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "autopay_consent": {
                    "type": "boolean",
                    "example": true,
                    "description": "должно быть `true`."
                  }
                },
                "required": [
                  "autopay_consent"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/payments": {
      "get": {
        "summary": "Получение истории платежей",
        "operationId": "subscription-payments",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "от `1` до `100`, по умолчанию `20`."
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-payments"
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/payments/{payment_id}/retry": {
      "post": {
        "summary": "Повтор последней неуспешной оплаты",
        "operationId": "subscription-retry-payment",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-retry-payment"
        }
      }
    },
    "/api/counterparty/payment-methods": {
      "get": {
        "summary": "Получение способов оплаты клиента",
        "operationId": "payment-methods-list",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 9
                          },
                          "payment_method_type": {
                            "type": "string",
                            "example": "bank_card"
                          },
                          "card_type": {
                            "type": "string",
                            "example": "Visa"
                          },
                          "card_last_4": {
                            "type": "string",
                            "example": "4242"
                          },
                          "title": {
                            "type": "string",
                            "example": "Visa •••• 4242"
                          },
                          "is_active": {
                            "type": "boolean",
                            "example": true
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#payment-methods-list"
        }
      }
    },
    "/api/counterparty/payment-methods/{id}": {
      "delete": {
        "summary": "Отвязка сохранённого способа оплаты",
        "operationId": "payment-method-delete",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Способ оплаты отвязан"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#payment-method-delete"
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/payment-method-change": {
      "post": {
        "summary": "Начало безопасной смены карты подписки",
        "operationId": "subscription-payment-method-change",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 31
                    },
                    "subscription_id": {
                      "type": "integer",
                      "example": 42
                    },
                    "status": {
                      "type": "string",
                      "example": "pending"
                    },
                    "confirmation_url": {
                      "type": "string",
                      "example": "https://yoomoney.ru/confirmation/...",
                      "format": "uri"
                    },
                    "saved_payment_method_id": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "example": null
                    },
                    "expires_at": {
                      "type": "string",
                      "example": "2026-08-16T11:00:00+00:00",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-payment-method-change"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "autopay_consent": {
                    "type": "boolean",
                    "example": true,
                    "description": "должно быть `true`."
                  }
                },
                "required": [
                  "autopay_consent"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/subscriptions/{id}/payment-method-changes/{change_id}/sync": {
      "post": {
        "summary": "Синхронизация смены карты",
        "operationId": "subscription-payment-method-change-sync",
        "tags": [
          "Сайты и приложения / Заказы и подписки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "change_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Заказы/#subscription-payment-method-change-sync"
        }
      }
    },
    "/api/counterparty/blocks/{code}": {
      "get": {
        "summary": "Получение блока по code",
        "operationId": "get-block-by-code",
        "tags": [
          "Сайты и приложения / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "code": {
                          "type": "integer",
                          "example": 9
                        },
                        "identifier": {
                          "type": "string",
                          "example": "home-hero"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главный баннер"
                        },
                        "avatar": {
                          "example": null
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка"
                            }
                          }
                        },
                        "link": {
                          "type": "string",
                          "example": "/catalog"
                        },
                        "file": {
                          "example": null
                        },
                        "text": {
                          "type": "string",
                          "example": "Новая коллекция"
                        },
                        "parent": {
                          "example": null
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-15T10:00:00+00:00",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Динамический контент/#get-block-by-code"
        }
      }
    },
    "/api/counterparty/blocks/id/{identifier}": {
      "get": {
        "summary": "Получение блока по identifier",
        "operationId": "get-block-by-identifier",
        "tags": [
          "Сайты и приложения / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "code": {
                          "type": "integer",
                          "example": 9
                        },
                        "identifier": {
                          "type": "string",
                          "example": "home-hero"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главный баннер"
                        },
                        "avatar": {
                          "example": null
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка"
                            }
                          }
                        },
                        "link": {
                          "type": "string",
                          "example": "/catalog"
                        },
                        "file": {
                          "example": null
                        },
                        "text": {
                          "type": "string",
                          "example": "Новая коллекция"
                        },
                        "parent": {
                          "example": null
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-15T10:00:00+00:00",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Динамический контент/#get-block-by-identifier"
        }
      }
    },
    "/api/counterparty/page_types": {
      "get": {
        "summary": "Получение типов страниц",
        "operationId": "page-types",
        "tags": [
          "Сайты и приложения / Страницы и публикации"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Страница"
                          },
                          "photo": {
                            "example": null
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "itemsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Страницы/#page-types"
        }
      }
    },
    "/api/counterparty/pages": {
      "get": {
        "summary": "Получение списка страниц",
        "operationId": "pages-list",
        "tags": [
          "Сайты и приложения / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "page_type_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "тип страницы; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/page_types",
                  "/api/counterparty/page_types"
                ]
              }
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поиск по заголовку, описанию и HTML-содержимому, от 3 символов;"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "`date_asc`, `date_desc`, `popularity_asc` или `popularity_desc`;"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1,
              "description": "номер страницы, по умолчанию `1`;"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "description": "размер страницы, по умолчанию `10`."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pages": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 101
                              },
                              "slug": {
                                "type": "string",
                                "example": "integration-guide"
                              },
                              "title": {
                                "type": "string",
                                "example": "Как подключить сервис"
                              },
                              "description": {
                                "type": "string",
                                "example": "Краткое описание"
                              },
                              "preview": {
                                "example": null
                              },
                              "content": {
                                "type": "string",
                                "example": "<p>Содержимое страницы</p>"
                              },
                              "views_count": {
                                "type": "integer",
                                "example": 12
                              },
                              "author": {
                                "example": null
                              },
                              "tags": {
                                "type": "array",
                                "items": {}
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2026-08-15T10:00:00+00:00",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Страницы/#pages-list"
        }
      }
    },
    "/api/counterparty/pages/{slug}": {
      "get": {
        "summary": "Получение страницы по slug",
        "operationId": "get-page",
        "tags": [
          "Сайты и приложения / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 101
                        },
                        "slug": {
                          "type": "string",
                          "example": "integration-guide"
                        },
                        "title": {
                          "type": "string",
                          "example": "Как подключить сервис"
                        },
                        "description": {
                          "type": "string",
                          "example": "Краткое описание"
                        },
                        "preview": {
                          "example": null
                        },
                        "content": {
                          "type": "string",
                          "example": "<p>Содержимое страницы</p>"
                        },
                        "views_count": {
                          "type": "integer",
                          "example": 13
                        },
                        "author": {
                          "example": null
                        },
                        "tags": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-15T10:00:00+00:00",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Страницы/#get-page"
        }
      }
    },
    "/api/counterparty/menus/{slug}": {
      "get": {
        "summary": "Получение меню по slug",
        "operationId": "get-application-menu",
        "tags": [
          "Сайты и приложения / Меню и навигация"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menuItems": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 1
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri"
                        },
                        "preview": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главное меню"
                        },
                        "url": {
                          "type": "string",
                          "example": "/catalog"
                        },
                        "children": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "integer",
                                "example": 2
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "preview": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "name": {
                                "type": "string",
                                "example": "Каталог"
                              },
                              "url": {
                                "type": "string",
                                "example": "/catalog"
                              },
                              "children": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Навигационная панель/#get-application-menu"
        },
        "description": "`slug` опционален. Если его не передать, backend ищет меню со slug `navpanel`."
      }
    },
    "/api/counterparty/menus/{name}/items": {
      "get": {
        "summary": "Получение пунктов проектного меню",
        "operationId": "get-project-menu-items",
        "tags": [
          "Сайты и приложения / Меню и навигация"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menuItems": {
                      "type": "array",
                      "items": {}
                    },
                    "menuItemsCount": {
                      "type": "integer",
                      "example": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Навигационная панель/#get-project-menu-items"
        },
        "description": "Этот endpoint использует другую модель меню: ищет меню по точному `name` внутри проекта текущего `Application` и возвращает его корневые пункты."
      }
    },
    "/api/counterparty/settings": {
      "get": {
        "summary": "Получение настроек витрины",
        "operationId": "application-settings",
        "tags": [
          "Сайты и приложения / Настройки и поиск"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "wholesale": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Вспомогательные запросы/#application-settings"
        }
      }
    },
    "/api/counterparty/tags": {
      "get": {
        "summary": "Получение тегов товаров",
        "operationId": "product-tags",
        "tags": [
          "Сайты и приложения / Настройки и поиск"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Новинка"
                          },
                          "photo": {
                            "example": null
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "tagsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Вспомогательные запросы/#product-tags"
        }
      }
    },
    "/api/counterparty/search/history": {
      "get": {
        "summary": "Получение истории поиска клиента",
        "operationId": "search-history",
        "tags": [
          "Сайты и приложения / Настройки и поиск"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "searchRequests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "value": {
                            "type": "string",
                            "example": "тональный крем"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "searchRequestsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Вспомогательные запросы/#search-history"
        }
      }
    },
    "/api/counterparty/search/popular": {
      "get": {
        "summary": "Текущее поведение маршрута популярных запросов",
        "operationId": "search-popular",
        "tags": [
          "Сайты и приложения / Настройки и поиск"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "searchRequests": {
                      "type": "array",
                      "items": {}
                    },
                    "searchRequestsCount": {
                      "type": "integer",
                      "example": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Вспомогательные запросы/#search-popular"
        },
        "description": "Маршрут существует, но фактически вызывает ту же персональную выборку, что и история поиска. Bearer на route не авторизуется, поэтому текущий runtime обычно возвращает пустой список вместо агрегированных популярных запросов."
      }
    },
    "/api/counterparty/notifications": {
      "get": {
        "summary": "Получение списка уведомлений",
        "operationId": "notifications-list",
        "tags": [
          "Сайты и приложения / Уведомления клиента"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "номер страницы, начиная с 1."
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "default": 10,
              "minimum": 1,
              "description": "количество уведомлений на странице. По умолчанию 10, максимум 50."
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": [],
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "идентификатор уведомления."
                          },
                          "icon": {
                            "example": null,
                            "description": "иконка уведомления. Сейчас возвращается `null`."
                          },
                          "title": {
                            "type": "string",
                            "example": "Не удалось продлить подписку",
                            "description": "заголовок уведомления."
                          },
                          "status": {
                            "type": "string",
                            "example": "subscription.charge_failed",
                            "description": "код события, например `subscription.charge_failed`."
                          },
                          "body": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "Проверьте способ оплаты и повторите платёж.",
                            "description": "текст уведомления или `null`."
                          },
                          "action_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "/account/subscriptions/42",
                            "description": "ссылка на связанное действие или `null`."
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-07-30T03:15:00+00:00",
                            "format": "date-time",
                            "description": "время создания в ISO 8601."
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "данные текущей страницы."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Уведомления/#notifications-list"
        }
      }
    },
    "/api/counterparty/categories": {
      "get": {
        "summary": "Получение категорий",
        "operationId": "categories",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "ограничение числа элементов, от `1`;"
            }
          },
          {
            "name": "parent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "получить дочерние категории указанного узла."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 12
                          },
                          "name": {
                            "type": "string",
                            "example": "Аксессуары"
                          },
                          "photo": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/category.jpg",
                            "format": "uri"
                          },
                          "parent": {
                            "example": null
                          }
                        }
                      }
                    },
                    "categoriesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#categories"
        }
      }
    },
    "/api/counterparty/brands": {
      "get": {
        "summary": "Получение брендов",
        "operationId": "brands",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "ограничение числа элементов, от `1`."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 99
                          },
                          "name": {
                            "type": "string",
                            "example": "Бренд"
                          },
                          "photo": {
                            "example": null
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "brandsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#brands"
        }
      }
    },
    "/api/counterparty/countries": {
      "get": {
        "summary": "Получение стран",
        "operationId": "countries",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Россия"
                          },
                          "photo": {
                            "example": null
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-15T10:00:00+00:00",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "countriesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#countries"
        }
      }
    },
    "/api/counterparty/delivery_types": {
      "get": {
        "summary": "Получение способов доставки",
        "operationId": "delivery-types",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveryTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Самовывоз"
                          },
                          "price": {
                            "type": "string",
                            "example": "0.00",
                            "format": "decimal"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1
                          }
                        }
                      }
                    },
                    "deliveryTypesCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#delivery-types"
        }
      }
    },
    "/api/counterparty/delivery_types/{type_id}": {
      "get": {
        "summary": "Получение одного способа доставки",
        "operationId": "delivery-type-show",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "type_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveryType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "name": {
                          "type": "string",
                          "example": "Доставка"
                        },
                        "price": {
                          "type": "string",
                          "example": "300.00",
                          "format": "decimal"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#delivery-type-show"
        }
      }
    },
    "/api/counterparty/delivery_types/{type_id}/subtypes": {
      "get": {
        "summary": "Получение подтипов доставки",
        "operationId": "delivery-subtypes",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "type_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliverySubtypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2
                          },
                          "name": {
                            "type": "string",
                            "example": "Курьер"
                          },
                          "price": {
                            "type": "string",
                            "example": "1000.00",
                            "format": "decimal"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1
                          }
                        }
                      }
                    },
                    "deliverySubtypesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#delivery-subtypes"
        }
      }
    },
    "/api/counterparty/delivery_types/{type_id}/subtypes/{subtype_id}": {
      "get": {
        "summary": "Получение одного подтипа доставки",
        "operationId": "delivery-subtype-show",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "type_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "subtype_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliverySubtype": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "name": {
                          "type": "string",
                          "example": "Курьер"
                        },
                        "price": {
                          "type": "string",
                          "example": "1000.00",
                          "format": "decimal"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#delivery-subtype-show"
        }
      }
    },
    "/api/counterparty/delivery_types/{type_id}/subtypes/{subtype_id}/params": {
      "get": {
        "summary": "Получение параметров подтипа",
        "operationId": "delivery-subtype-params",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "type_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "subtype_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliverySubtypeParams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 7
                          },
                          "name": {
                            "type": "string",
                            "example": "г Москва, ул Деловая, д 20"
                          }
                        }
                      }
                    },
                    "deliverySubtypeParamsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#delivery-subtype-params"
        },
        "description": "Параметры представляют дополнительные варианты подтипа, например конкретные пункты выдачи."
      }
    },
    "/api/counterparty/payment_types": {
      "get": {
        "summary": "Получение способов оплаты",
        "operationId": "payment-types",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "paymentTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2
                          },
                          "photo": {
                            "example": null
                          },
                          "name": {
                            "type": "string",
                            "example": "Онлайн"
                          },
                          "description": {
                            "type": "string",
                            "example": "Оплата через платёжный сервис"
                          }
                        }
                      }
                    },
                    "paymentTypesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#payment-types"
        }
      }
    },
    "/api/counterparty/shops": {
      "get": {
        "summary": "Получение магазинов и пунктов самовывоза",
        "operationId": "shops",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 4
                          },
                          "photo": {
                            "example": null
                          },
                          "name": {
                            "type": "string",
                            "example": "Центральный"
                          },
                          "address": {
                            "type": "string",
                            "example": "г Москва, ул Деловая, д 20"
                          },
                          "phone": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "schedule": {
                            "type": "string",
                            "example": "Пн–Пт, 10:00–18:00"
                          }
                        }
                      }
                    },
                    "shopsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#shops"
        }
      }
    },
    "/api/counterparty/shops/{id}": {
      "get": {
        "summary": "Текущее поведение маршрута карточки магазина",
        "operationId": "shop-show-legacy",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 103
                        },
                        "slug": {
                          "type": "string",
                          "example": "shops-info"
                        },
                        "title": {
                          "type": "string",
                          "example": "Информация о магазинах"
                        },
                        "content": {
                          "type": "string",
                          "example": "<p>Справочная информация</p>"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#shop-show-legacy"
        },
        "description": "Этот route **не является карточкой магазина**. Route model binding проверяет существование переданного shop ID, но controller игнорирует выбранный объект и возвращает первую глобальную страницу со slug `shops-info`."
      }
    },
    "/api/counterparty/search_address": {
      "post": {
        "summary": "Поиск адреса",
        "operationId": "search-address",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "г Москва, ул Деловая, д 20"
                          },
                          "value": {
                            "type": "string",
                            "example": "115477, г Москва, ул Деловая, д 20"
                          }
                        }
                      }
                    },
                    "addressesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#search-address"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Деловая 20, Москва",
                    "description": "поисковая строка от 3 до 1024 символов."
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/slides": {
      "get": {
        "summary": "Получение рекламных слайдов",
        "operationId": "slides",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "slides": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "photo": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/slide.jpg",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "example": "Новая коллекция"
                          },
                          "description": {
                            "type": "string",
                            "example": "Скидка на выбранные товары"
                          },
                          "link": {
                            "type": "string",
                            "example": "/catalog"
                          }
                        }
                      }
                    },
                    "slidesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#slides"
        },
        "description": "Слайды ограничены текущим `Application`."
      }
    },
    "/api/counterparty/dictionaries": {
      "get": {
        "summary": "Получение нескольких справочников одним запросом",
        "operationId": "dictionaries",
        "tags": [
          "Сайты и приложения / Справочники витрины"
        ],
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "список через запятую: `categories`, `brands`, `countries`, `tags`, `popular_requests`."
            }
          }
        ],
        "security": [
          {
            "appTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dictionaries": {
                      "type": "object",
                      "properties": {
                        "categories": {
                          "type": "array",
                          "items": {}
                        },
                        "brands": {
                          "type": "array",
                          "items": {}
                        },
                        "countries": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/E-Commerce/Справочники/#dictionaries"
        }
      }
    },
    "/api/send_password": {
      "post": {
        "summary": "Отправка пароля на электронную почту",
        "operationId": "post_api_send_password",
        "tags": [
          "Платформа / Доступ сотрудников"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Password successfully send",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Авторизация/#send-password"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string",
                    "example": "user@example.test",
                    "description": "адрес электронной почты"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/login": {
      "post": {
        "summary": "Авторизация",
        "operationId": "post_api_login",
        "tags": [
          "Платформа / Доступ сотрудников"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "<opaque_token>"
                            }
                          }
                        },
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "owner"
                            },
                            "description": {
                              "type": "string",
                              "example": "Собственник"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "branch": {
                          "example": null
                        },
                        "department": {
                          "example": null
                        },
                        "login": {
                          "type": "string",
                          "example": "user@example.test"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Артём"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Полищук"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Николаевич"
                        },
                        "birthday": {
                          "type": "string",
                          "example": "1981-05-20",
                          "format": "date"
                        },
                        "employment_date": {
                          "example": null
                        },
                        "dismissal_date": {
                          "example": null
                        },
                        "avatar": {
                          "example": null
                        },
                        "employment_contract": {
                          "example": null
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_sick": {
                          "type": "boolean",
                          "example": false
                        },
                        "creator": {
                          "example": null
                        },
                        "active_time": {
                          "type": "integer",
                          "example": 0
                        },
                        "last_activity_at": {
                          "example": null
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2
                              },
                              "screen": {
                                "example": null
                              },
                              "name": {
                                "type": "string",
                                "example": "edit-admins"
                              },
                              "description": {
                                "type": "string",
                                "example": "Редактирование администраторов"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-04-03T07:07:11.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Авторизация/#login"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string",
                    "example": "user@example.test",
                    "description": "адрес электронной почты"
                  },
                  "password": {
                    "type": "string",
                    "example": "<secret>",
                    "description": "пароль из письма, отправленного по `POST /api/send_password`"
                  }
                },
                "required": [
                  "login",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/api/user": {
      "get": {
        "summary": "Проверка рабочего Agent Token",
        "operationId": "mcp-agent-whoami",
        "tags": [
          "Платформа / MCP: рабочие методы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/#mcp-agent-whoami"
        },
        "description": "\" success=\"200\" > Endpoint возвращает wrapper `user` с обычным `UserResource`: ID, login, ФИО, роль, филиал, отдел, состояние блокировки, permissions и даты активности. Используйте ответ, чтобы проверить: токен принят backend; учётная запись не заблокирована; роль, филиал и permissions соответствуют ожидаемому профилю tools. **Ограничение текущего контракта:** `GET /api/user` не возвращает `is_agent` и `project_id`. Поэтому MCP-сервер не может доказать эти два значения по whoami. Тип учётной записи и ожидаемый проект должны храниться в конфигурации подключения, сформированной при выдаче доступ"
      }
    },
    "/api/user/logout": {
      "post": {
        "summary": "Выход пользователя из системы",
        "operationId": "post_api_user_logout",
        "tags": [
          "Платформа / Доступ сотрудников"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "User successfully logout from all devices",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Авторизация/#logout"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_all_devices": {
                    "type": "boolean",
                    "example": true,
                    "description": "признак, указывающий на необходимость выхода сразу со всех устройств"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests": {
      "post": {
        "summary": "Создание запроса доступа",
        "operationId": "agent-access-request-create",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Если такой администратор есть, мы отправили запрос."
                    },
                    "request": {
                      "type": "object",
                      "properties": {
                        "public_id": {
                          "type": "string",
                          "example": "3f48862d-516d-4c7b-b486-9b7bb205f920"
                        },
                        "request_token": {
                          "type": "string",
                          "example": "<opaque_token>"
                        },
                        "expires_at": {
                          "type": "string",
                          "example": "2026-08-16T16:30:00+00:00",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "owner_email": {
                    "type": "string",
                    "example": "owner@example.com",
                    "description": "e-mail владельца или уполномоченного администратора проекта, до 255 символов;"
                  },
                  "agent_name": {
                    "type": "string",
                    "example": "MCP Order Assistant",
                    "description": "понятное имя агента, от 1 до 255 символов;"
                  },
                  "agent_login": {
                    "type": "string",
                    "example": "mcp-order-assistant",
                    "description": "уникальный технический login, от 3 до 255 символов;"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "view-orders",
                      "description": "до 100 существующих permissions с `guard_name = user`;"
                    },
                    "description": "до 100 существующих permissions с `guard_name = user`;"
                  },
                  "purpose": {
                    "type": "string",
                    "example": "Читать заказы и готовить сводки",
                    "description": "назначение агента, до 5000 символов."
                  }
                },
                "required": [
                  "owner_email",
                  "agent_name",
                  "agent_login",
                  "permissions",
                  "purpose"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests/{publicId}/review": {
      "get": {
        "summary": "Страница подтверждения для владельца",
        "operationId": "agent-access-request-review-page",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "description": "публичный UUID запроса из ответа создания.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-review-page"
        }
      },
      "post": {
        "summary": "Получение данных для review",
        "operationId": "agent-access-request-review",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "pending"
                    },
                    "request": {
                      "type": "object",
                      "properties": {
                        "public_id": {
                          "type": "string",
                          "example": "3f48862d-516d-4c7b-b486-9b7bb205f920"
                        },
                        "agent_name": {
                          "type": "string",
                          "example": "MCP Order Assistant"
                        },
                        "agent_login": {
                          "type": "string",
                          "example": "mcp-order-assistant"
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "employee"
                            }
                          }
                        },
                        "requested_permissions": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "view-orders"
                          }
                        },
                        "approved_permissions": {
                          "example": null
                        },
                        "purpose": {
                          "type": "string",
                          "example": "Читать заказы и готовить сводки"
                        },
                        "expires_at": {
                          "type": "string",
                          "example": "2026-08-16T16:30:00+00:00",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-review"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approval_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "секрет из fragment ссылки подтверждения."
                  }
                },
                "required": [
                  "approval_token"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests/{publicId}/approve": {
      "post": {
        "summary": "Одобрение доступа",
        "operationId": "agent-access-request-approve",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "approved"
                    },
                    "message": {
                      "type": "string",
                      "example": "Доступ одобрен. Агент может забрать токен."
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-approve"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approval_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "секрет подтверждения;"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "view-orders",
                      "description": "итоговое подмножество первоначально запрошенных permissions."
                    },
                    "description": "итоговое подмножество первоначально запрошенных permissions."
                  }
                },
                "required": [
                  "approval_token",
                  "permissions"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests/{publicId}/decline": {
      "post": {
        "summary": "Отклонение доступа",
        "operationId": "agent-access-request-decline",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "declined"
                    },
                    "message": {
                      "type": "string",
                      "example": "Запрос доступа отклонён."
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-decline"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approval_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "секрет подтверждения."
                  }
                },
                "required": [
                  "approval_token"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests/{publicId}/status": {
      "post": {
        "summary": "Статус запроса доступа",
        "operationId": "agent-access-request-status",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "approved"
                    },
                    "expires_at": {
                      "type": "string",
                      "example": "2026-08-16T16:30:00+00:00",
                      "format": "date-time"
                    },
                    "server_time": {
                      "type": "string",
                      "example": "2026-08-16T16:05:12+00:00",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-status"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "секрет, полученный при создании access request."
                  }
                },
                "required": [
                  "request_token"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent-access-requests/{publicId}/consume": {
      "post": {
        "summary": "Создание агента и получение первого токена",
        "operationId": "agent-access-request-consume",
        "tags": [
          "Платформа / MCP: получение доступа"
        ],
        "parameters": [
          {
            "name": "publicId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "consumed"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 214
                        },
                        "name": {
                          "type": "string",
                          "example": "MCP Order Assistant"
                        },
                        "login": {
                          "type": "string",
                          "example": "mcp-order-assistant"
                        }
                      }
                    },
                    "agent_token": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 901
                        },
                        "name": {
                          "type": "string",
                          "example": "<opaque_token>"
                        },
                        "value": {
                          "type": "string",
                          "example": "<opaque_token>"
                        },
                        "expires_at": {
                          "type": "string",
                          "example": "<opaque_token>",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Получение доступа/#agent-access-request-consume"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_token": {
                    "type": "string",
                    "example": "<opaque_token>",
                    "description": "секрет, полученный при создании access request."
                  }
                },
                "required": [
                  "request_token"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agents": {
      "get": {
        "summary": "Список агентов проекта",
        "operationId": "agent-list",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "role_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "роли агентов; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/roles"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "branch_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "филиалы; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/branches"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "department_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "отделы; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/departments"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "is_banned",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "description": "состояние блокировки;"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания от;"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания по;"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "поиск по имени или login, от 3 до 255 символов."
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 214
                          },
                          "code": {
                            "type": "string",
                            "example": "12345678901"
                          },
                          "name": {
                            "type": "string",
                            "example": "Order Assistant"
                          },
                          "login": {
                            "type": "string",
                            "example": "order-assistant"
                          },
                          "role": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 14
                              },
                              "name": {
                                "type": "string",
                                "example": "employee"
                              }
                            }
                          },
                          "branch": {
                            "example": null
                          },
                          "department": {
                            "example": null
                          },
                          "agent_description": {
                            "type": "string",
                            "example": "Готовит сводки по заказам"
                          },
                          "is_agent": {
                            "type": "boolean",
                            "example": true
                          },
                          "is_banned": {
                            "type": "boolean",
                            "example": false
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 7
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Артём"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Полищук"
                              },
                              "middle_name": {
                                "example": null
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            }
                          },
                          "last_activity_at": {
                            "example": null
                          },
                          "permissions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "example": "view-orders"
                                }
                              }
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-08-16T16:00:00.000000Z",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2026-08-16T16:00:00.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "agentsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-list"
        },
        "description": "\" success=\"200\" >"
      },
      "post": {
        "summary": "Создание агента",
        "operationId": "agent-create",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 214
                        },
                        "code": {
                          "type": "string",
                          "example": "12345678901"
                        },
                        "name": {
                          "type": "string",
                          "example": "Order Assistant"
                        },
                        "login": {
                          "type": "string",
                          "example": "order-assistant"
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "employee"
                            }
                          }
                        },
                        "branch": {
                          "example": null
                        },
                        "department": {
                          "example": null
                        },
                        "agent_description": {
                          "type": "string",
                          "example": "Готовит сводки по заказам"
                        },
                        "is_agent": {
                          "type": "boolean",
                          "example": true
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 7
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "example": null
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "last_activity_at": {
                          "example": null
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "view-orders"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-16T16:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-08-16T16:00:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-create"
        },
        "description": "\" success=\"200\" >",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Order Assistant",
                    "description": "имя агента, от 1 до 255 символов;"
                  },
                  "login": {
                    "type": "string",
                    "example": "order-assistant",
                    "description": "уникальный среди всех users технический login, от 3 до 255 символов;"
                  },
                  "role_id": {
                    "type": "integer",
                    "example": 14,
                    "description": "роль текущего проекта; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/roles"
                      ]
                    }
                  },
                  "branch_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "филиал текущего проекта или `null`; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "department_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "отдел текущего проекта или `null`; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/departments"
                      ]
                    }
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "view-orders",
                      "description": "permissions с `guard_name = user`, которые actor вправе делегировать;"
                    },
                    "description": "permissions с `guard_name = user`, которые actor вправе делегировать;"
                  },
                  "agent_description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "Готовит сводки по заказам",
                    "description": "назначение агента, до 5000 символов, или `null`;"
                  },
                  "is_banned": {
                    "type": "boolean",
                    "example": false,
                    "description": "создать агента сразу отключённым."
                  }
                },
                "required": [
                  "name",
                  "login",
                  "role_id",
                  "branch_id",
                  "department_id",
                  "permissions",
                  "agent_description",
                  "is_banned"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tables/agents": {
      "get": {
        "summary": "Табличный список агентов",
        "operationId": "agent-table-list",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "role_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "роли агентов; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/roles"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "branch_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "филиалы; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/branches"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "department_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "отделы; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/departments"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "is_banned",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "description": "состояние блокировки;"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания от;"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания по;"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "поиск по имени или login, от 3 до 255 символов;"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "номер страницы;"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "размер страницы."
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 1
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        }
                      }
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "integer",
                                "example": 214
                              },
                              "url": {
                                "type": "string",
                                "example": "<frontend_url>/agents/list-agents/214"
                              }
                            }
                          },
                          "code": {
                            "type": "string",
                            "example": "12345678901"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "string",
                                "example": "Order Assistant"
                              },
                              "url": {
                                "type": "string",
                                "example": "<frontend_url>/agents/list-agents/214"
                              }
                            }
                          },
                          "branch": {
                            "example": null
                          },
                          "department": {
                            "example": null
                          },
                          "role": {
                            "type": "string",
                            "example": "Сотрудник"
                          },
                          "login": {
                            "type": "string",
                            "example": "order-assistant"
                          },
                          "is_banned": {
                            "type": "boolean",
                            "example": false
                          },
                          "last_activity_at": {
                            "type": "string",
                            "example": "Ожидание входа"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 20
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-table-list"
        },
        "description": "\" success=\"200\" >"
      }
    },
    "/api/agents/{agent}": {
      "get": {
        "summary": "Получение агента",
        "operationId": "agent-show",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "description": "ID agent account из проекта actor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 214
                        },
                        "code": {
                          "type": "string",
                          "example": "12345678901"
                        },
                        "name": {
                          "type": "string",
                          "example": "Order Assistant"
                        },
                        "login": {
                          "type": "string",
                          "example": "order-assistant"
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "employee"
                            }
                          }
                        },
                        "branch": {
                          "example": null
                        },
                        "department": {
                          "example": null
                        },
                        "agent_description": {
                          "type": "string",
                          "example": "Готовит сводки по заказам"
                        },
                        "is_agent": {
                          "type": "boolean",
                          "example": true
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 7
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "example": null
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "last_activity_at": {
                          "example": null
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "view-orders"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-16T16:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-08-16T16:00:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-show"
        },
        "description": "\" success=\"200\" >"
      },
      "patch": {
        "summary": "Изменение агента",
        "operationId": "agent-update",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 214
                        },
                        "code": {
                          "type": "string",
                          "example": "12345678901"
                        },
                        "name": {
                          "type": "string",
                          "example": "Order Assistant v2"
                        },
                        "login": {
                          "type": "string",
                          "example": "order-assistant"
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "employee"
                            }
                          }
                        },
                        "branch": {
                          "example": null
                        },
                        "department": {
                          "example": null
                        },
                        "agent_description": {
                          "type": "string",
                          "example": "Готовит только сводки заказов"
                        },
                        "is_agent": {
                          "type": "boolean",
                          "example": true
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 7
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "example": null
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "last_activity_at": {
                          "example": null
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "view-orders"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-08-16T16:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-08-16T16:10:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-update"
        },
        "description": "\" success=\"200\" >",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Order Assistant v2",
                    "description": "новое имя, от 1 до 255 символов;"
                  },
                  "login": {
                    "type": "string",
                    "example": "order-assistant",
                    "description": "новый уникальный login, от 3 до 255 символов;"
                  },
                  "role_id": {
                    "type": "integer",
                    "example": 14,
                    "description": "новая роль текущего проекта; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/roles"
                      ]
                    }
                  },
                  "branch_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "филиал текущего проекта или `null` для очистки; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "department_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "отдел текущего проекта или `null` для очистки; Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/departments"
                      ]
                    }
                  },
                  "permissions": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "example": "view-orders",
                      "description": "полный новый набор permissions; пустой массив или `null` очищает права;"
                    },
                    "description": "полный новый набор permissions; пустой массив или `null` очищает права;"
                  },
                  "agent_description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "Готовит только сводки заказов",
                    "description": "новое описание или `null`;"
                  },
                  "is_banned": {
                    "type": "boolean",
                    "example": false,
                    "description": "состояние блокировки."
                  }
                },
                "required": [
                  "name",
                  "login",
                  "role_id",
                  "branch_id",
                  "department_id",
                  "permissions",
                  "agent_description",
                  "is_banned"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Отключение агента",
        "operationId": "agent-disable",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "description": "ID agent account из проекта actor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Агент успешно отключён"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-disable"
        },
        "description": "\" success=\"200\" >"
      }
    },
    "/api/agents/{agent}/tokens": {
      "get": {
        "summary": "Список токенов агента",
        "operationId": "agent-token-list",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "description": "ID agent account из проекта actor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 901
                          },
                          "name": {
                            "type": "string",
                            "example": "<opaque_token>"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "<opaque_token>",
                            "format": "date-time"
                          },
                          "last_used_at": {
                            "example": null
                          },
                          "expires_at": {
                            "type": "string",
                            "example": "<opaque_token>",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "agentTokensCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-token-list"
        },
        "description": "\" success=\"200\" >"
      },
      "post": {
        "summary": "Выпуск Agent Token",
        "operationId": "agent-token-create",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_token": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 901
                        },
                        "name": {
                          "type": "string",
                          "example": "<opaque_token>"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "<opaque_token>",
                          "format": "date-time"
                        },
                        "last_used_at": {
                          "example": null
                        },
                        "expires_at": {
                          "type": "string",
                          "example": "<opaque_token>",
                          "format": "date-time"
                        },
                        "value": {
                          "type": "string",
                          "example": "<opaque_token>"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-token-create"
        },
        "description": "\" success=\"201\" >",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "production-mcp",
                    "description": "назначение токена, от 3 до 100 символов;"
                  },
                  "expires_at": {
                    "type": "string",
                    "example": "2027-02-16T16:00:00+00:00",
                    "format": "date-time",
                    "description": "дата истечения в будущем, не дальше одного года."
                  }
                },
                "required": [
                  "name",
                  "expires_at"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agents/{agent}/tokens/{token}": {
      "delete": {
        "summary": "Отзыв Agent Token",
        "operationId": "agent-token-revoke",
        "tags": [
          "Платформа / Управление агентами"
        ],
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "description": "ID agent account из проекта actor;",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "ID токена из `GET /api/agents/{agent}/tokens`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Токен агента успешно отозван"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/МСП/Управление агентами/#agent-token-revoke"
        },
        "description": "\" success=\"200\" >"
      }
    },
    "/api/users": {
      "get": {
        "summary": "Поиск пользователя по строке",
        "operationId": "get_api_users",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка по ФИО"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 3
                          },
                          "first_name": {
                            "type": "string",
                            "example": "Сергей"
                          },
                          "last_name": {
                            "type": "string",
                            "example": "Иванов"
                          },
                          "middle_name": {
                            "type": "string",
                            "example": "Петрович"
                          },
                          "name": {
                            "type": "string",
                            "example": "Иванов Сергей"
                          },
                          "login": {
                            "type": "string",
                            "example": "user@example.test"
                          }
                        }
                      }
                    },
                    "usersCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#users-search"
        },
        "description": "Используется при выборе ответственного пользователя в форме бизнеса (autocomplete)."
      }
    },
    "/api/managers": {
      "get": {
        "summary": "Список менеджеров (упрощённый)",
        "operationId": "managers-list",
        "tags": [
          "Платформа / Сотрудники и менеджеры"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "managers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Полищук Артём"
                          }
                        }
                      }
                    },
                    "managersCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Пользователи/#managers-list"
        },
        "description": "Минимальный список пользователей, имеющих роль менеджера. Используется в фильтрах таблиц контрагентов, заказов и т.п."
      }
    },
    "/api/responsible_users": {
      "get": {
        "summary": "Список ответственных пользователей (для фильтра)",
        "operationId": "get_api_responsible_users",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responsibleUsers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2
                          },
                          "name": {
                            "type": "string",
                            "example": "Жуков Алексей"
                          }
                        }
                      }
                    },
                    "responsibleUsersCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#responsible-users"
        },
        "description": "Используется в фильтре «Ответственный» на таблице бизнесов."
      }
    },
    "/api/branches": {
      "get": {
        "summary": "Список бизнесов",
        "operationId": "branches-list",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка (необязательно)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "code": {
                            "type": "string",
                            "example": "1349",
                            "description": "внутренний код бизнеса"
                          },
                          "responsible_user": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "первичный ключ"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Алексей"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Жуков"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Игоревич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Жуков Алексей",
                                "description": "полное юридическое наименование"
                              }
                            },
                            "description": "ответственный пользователь (объект): `id`, `first_name`, `last_name`, `middle_name`, `name`"
                          },
                          "avatar": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 40,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "organic-cosmetics.png",
                                "description": "полное юридическое наименование"
                              },
                              "path": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/organic-cosmetics.png",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-06-17T16:05:02.000000Z",
                                "format": "date-time",
                                "description": "дата создания"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2024-06-17T16:05:02.000000Z",
                                "format": "date-time"
                              }
                            },
                            "description": "файл аватара/логотипа или `null`"
                          },
                          "title": {
                            "type": "string",
                            "example": "Продажа косметики",
                            "description": "короткое название проекта/бизнеса"
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658",
                            "description": "реквизиты юрлица"
                          },
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\"",
                            "description": "полное юридическое наименование"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "email": {
                            "type": "string",
                            "example": "user@example.test"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич",
                            "description": "ФИО директора"
                          },
                          "address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                            "description": "фактический адрес"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                            "description": "юридический адрес"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:26:29.000000Z",
                            "format": "date-time",
                            "description": "дата создания"
                          }
                        }
                      }
                    },
                    "branchesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество бизнесов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branches-list"
        }
      },
      "post": {
        "summary": "Создание бизнеса",
        "operationId": "branch-create",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "...": {
                          "type": "string",
                          "example": "поля как в GET"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "example": "Продажа косметики",
                    "description": "короткое название проекта"
                  },
                  "name": {
                    "type": "string",
                    "example": "ООО \"АЙТЕКО\"",
                    "description": "полное юридическое наименование"
                  },
                  "code": {
                    "type": "string",
                    "example": "1349",
                    "description": "внутренний код"
                  },
                  "inn": {
                    "type": "string",
                    "example": "5403057658",
                    "description": "реквизиты юрлица"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001"
                  },
                  "head": {
                    "type": "string",
                    "example": "Снегирёв Алексей Игоревич",
                    "description": "ФИО директора"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "фактический адрес"
                  },
                  "legal_address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "юридический адрес"
                  },
                  "responsible_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": 2,
                    "description": "ID ответственного пользователя (nullable) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/responsible_users"
                      ]
                    }
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 40,
                    "description": "ID файла аватара (необязательно)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/branches": {
      "get": {
        "summary": "Таблица бизнесов (для UI с колонками и пагинацией)",
        "operationId": "branches-table",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "responsible_user_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "фильтр по ответственному Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/responsible_users"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "пагинация"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 4
                          },
                          "order": {
                            "type": "integer",
                            "example": 1
                          },
                          "key": {
                            "type": "string",
                            "example": "title"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 1
                          },
                          "text": {
                            "type": "string",
                            "example": "Название"
                          }
                        }
                      }
                    },
                    "branches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "code": {
                            "type": "string",
                            "example": "1349"
                          },
                          "title": {
                            "type": "string",
                            "example": "Продажа косметики"
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 5
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 15
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 5
                        }
                      },
                      "description": "стандартный Laravel-пагинатор"
                    },
                    "message": {
                      "type": "string",
                      "example": "",
                      "description": "служебное сообщение (обычно пусто)"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branches-table"
        },
        "description": "Возвращает данные, готовые к отрисовке таблицы: список колонок, упрощённые бизнесы и пагинацию."
      }
    },
    "/api/branches/{id}": {
      "get": {
        "summary": "Получение бизнеса по ID",
        "operationId": "branch-get",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "code": {
                          "type": "string",
                          "example": "1349"
                        },
                        "responsible_user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Алексей"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Жуков"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Игоревич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Жуков Алексей"
                            }
                          }
                        },
                        "avatar": {
                          "example": null
                        },
                        "title": {
                          "type": "string",
                          "example": "Разработка и продажа ПО"
                        },
                        "inn": {
                          "type": "string",
                          "example": "5403057658"
                        },
                        "name": {
                          "type": "string",
                          "example": "ООО \"АЙТЕКО\""
                        },
                        "kpp": {
                          "type": "string",
                          "example": "540301001"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "phone_2": {
                          "example": null
                        },
                        "email": {
                          "type": "string",
                          "example": "user@example.test"
                        },
                        "head": {
                          "type": "string",
                          "example": "Снегирёв Алексей Игоревич"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "legal_address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-27T07:26:29.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-get"
        }
      },
      "put": {
        "summary": "Изменение бизнеса",
        "operationId": "branch-update",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "...": {
                          "type": "string",
                          "example": "обновлённый объект"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/branches. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "example": "Продажа косметики",
                    "description": "короткое название проекта"
                  },
                  "name": {
                    "type": "string",
                    "example": "ООО \"АЙТЕКО\"",
                    "description": "полное юридическое наименование"
                  },
                  "code": {
                    "type": "string",
                    "example": "1349",
                    "description": "внутренний код"
                  },
                  "inn": {
                    "type": "string",
                    "example": "5403057658",
                    "description": "реквизиты юрлица"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001"
                  },
                  "head": {
                    "type": "string",
                    "example": "Снегирёв Алексей Игоревич",
                    "description": "ФИО директора"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "фактический адрес"
                  },
                  "legal_address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "юридический адрес"
                  },
                  "responsible_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": 2,
                    "description": "ID ответственного пользователя (nullable) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/responsible_users"
                      ]
                    }
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 40,
                    "description": "ID файла аватара (необязательно)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление бизнеса",
        "operationId": "branch-delete",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Branch deleted"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-delete"
        }
      }
    },
    "/api/branches/{id}/bank_requisites": {
      "get": {
        "summary": "Список реквизитов бизнеса",
        "operationId": "branch-bank-requisites-list",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, г. Новосибирск, Красный проспект, д. 5"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-bank-requisites-list"
        }
      },
      "post": {
        "summary": "Добавление реквизита бизнеса",
        "operationId": "branch-bank-requisite-create",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-bank-requisite-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches/{id}/bank_requisites/{requisiteId}": {
      "put": {
        "summary": "Изменение реквизита бизнеса",
        "operationId": "branch-bank-requisite-update",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "requisiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-bank-requisite-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/branches/{id}/bank_requisites. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches/{id}/history": {
      "get": {
        "summary": "История изменений бизнеса",
        "operationId": "branch-history",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "histories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 101,
                            "description": "ID события"
                          },
                          "icon": {
                            "type": "string",
                            "example": "edit",
                            "description": "имя иконки (`edit`, `add`, `delete`, …)"
                          },
                          "color": {
                            "type": "string",
                            "example": "info",
                            "description": "`primary | secondary | info | success | warning | error | dark | light`"
                          },
                          "title": {
                            "type": "string",
                            "example": "Изменён телефон",
                            "description": "короткий заголовок"
                          },
                          "description": {
                            "type": "string",
                            "example": "phone_1: 79139121349 → 79991112233",
                            "description": "описание изменения"
                          },
                          "datetime": {
                            "type": "string",
                            "example": "2024-04-03T07:07:11.000000Z",
                            "format": "date-time",
                            "description": "ISO-8601"
                          }
                        }
                      }
                    },
                    "historiesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество событий"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#branch-history"
        }
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations": {
      "get": {
        "summary": "Список интеграций реквизита",
        "operationId": "integrations-list",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID связи (реквизит ↔ интеграция)"
                          },
                          "integration_id": {
                            "type": "integer",
                            "example": 5,
                            "description": "ID типа интеграции в каталоге"
                          },
                          "name": {
                            "type": "string",
                            "example": "Сбербанк API",
                            "description": "название интеграции"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/integrations/sberbank.svg",
                            "format": "uri",
                            "description": "URL логотипа"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1,
                            "description": "`1` если активна, иначе `0`"
                          },
                          "parameters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID связи (реквизит ↔ интеграция)"
                                },
                                "title": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "key_1": {
                                  "type": "string",
                                  "example": "login"
                                },
                                "key_2": {
                                  "type": "string",
                                  "example": "password"
                                },
                                "description_1": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "description_2": {
                                  "type": "string",
                                  "example": "Пароль"
                                }
                              }
                            }
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID связи (реквизит ↔ интеграция)"
                                },
                                "key_1": {
                                  "type": "string",
                                  "example": "login"
                                },
                                "key_2": {
                                  "type": "string",
                                  "example": "password"
                                },
                                "description_1": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "description_2": {
                                  "type": "string",
                                  "example": "Пароль"
                                },
                                "value_1": {
                                  "type": "string",
                                  "example": "user123"
                                },
                                "value_2": {
                                  "type": "string",
                                  "example": "***"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "integrationsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integrations-list"
        }
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationsId}": {
      "put": {
        "summary": "Изменение интеграции реквизита",
        "operationId": "integration-update",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "integration_id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Сбербанк API"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1
                        },
                        "parameters": {
                          "type": "array",
                          "items": {}
                        },
                        "values": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integration-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_active": {
                    "type": "string",
                    "description": "`1` чтобы активировать, `0` чтобы выключить"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/{integrationId}": {
      "get": {
        "summary": "Описание интеграции по ID",
        "operationId": "integration-show",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Сбербанк API"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/integrations/sberbank.svg",
                          "format": "uri"
                        },
                        "params": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "title": {
                                "type": "string",
                                "example": "Логин и пароль"
                              },
                              "order": {
                                "type": "integer",
                                "example": 1
                              },
                              "key_1": {
                                "type": "string",
                                "example": "login"
                              },
                              "key_2": {
                                "type": "string",
                                "example": "password"
                              },
                              "description_1": {
                                "type": "string",
                                "example": "Логин"
                              },
                              "description_2": {
                                "type": "string",
                                "example": "Пароль"
                              }
                            },
                            "description": "определения параметров: `id`, `title`, `order`, `key_1`/`key_2`, `description_1`/`description_2` (двухколоночный layout: ключ-значение)"
                          },
                          "description": "определения параметров: `id`, `title`, `order`, `key_1`/`key_2`, `description_1`/`description_2` (двухколоночный layout: ключ-значение)"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integration-show"
        },
        "description": "Возвращает каталожное описание интеграции (без привязки к реквизиту) — нужно, чтобы узнать какие параметры она ждёт."
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationId}/parameters": {
      "get": {
        "summary": "Параметры (значения) интеграции реквизита",
        "operationId": "integration-parameters-list",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "key_1": {
                            "type": "string",
                            "example": "login"
                          },
                          "description_1": {
                            "type": "string",
                            "example": "Логин"
                          },
                          "key_2": {
                            "type": "string",
                            "example": "password"
                          },
                          "description_2": {
                            "type": "string",
                            "example": "Пароль"
                          },
                          "value_1": {
                            "type": "string",
                            "example": "user123"
                          },
                          "value_2": {
                            "type": "string",
                            "example": "***"
                          }
                        }
                      }
                    },
                    "parametersCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integration-parameters-list"
        }
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationsId}/parameters": {
      "post": {
        "summary": "Добавление значения параметра интеграции",
        "operationId": "integration-parameter-create",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 7
                        },
                        "key_1": {
                          "type": "string",
                          "example": "login"
                        },
                        "description_1": {
                          "type": "string",
                          "example": "Логин"
                        },
                        "key_2": {
                          "type": "string",
                          "example": "password"
                        },
                        "description_2": {
                          "type": "string",
                          "example": "Пароль"
                        },
                        "value_1": {
                          "type": "string",
                          "example": "user123"
                        },
                        "value_2": {
                          "type": "string",
                          "example": "secret"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integration-parameter-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_parameter_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID определения параметра (из `params[]` интеграции)"
                  },
                  "value_1": {
                    "type": "string",
                    "example": "user123",
                    "description": "значение первого поля"
                  },
                  "value_2": {
                    "type": "string",
                    "example": "secret",
                    "description": "значение второго поля"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationId}/parameters/{parameterId}": {
      "delete": {
        "summary": "Удаление значения параметра интеграции",
        "operationId": "integration-parameter-delete",
        "tags": [
          "Платформа / Бизнесы и реквизиты"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parameterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Parameter deleted"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Бизнесы/#integration-parameter-delete"
        }
      }
    },
    "/api/applications": {
      "get": {
        "summary": "Получение списка приложений",
        "operationId": "applications-list",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "поиск по названию, не менее трёх символов."
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#applications-list"
        }
      },
      "post": {
        "summary": "Создание приложения",
        "operationId": "application-create",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "название приложения."
                  },
                  "is_website": {
                    "type": "boolean",
                    "description": "`true` для сайта, `false` для другого типа клиента."
                  },
                  "branch_id": {
                    "type": "integer",
                    "description": "ID филиала. Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "sales_strategy_id": {
                    "type": "integer",
                    "description": "ID стратегии продаж. Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/sales_strategies"
                      ]
                    }
                  },
                  "code": {
                    "type": "integer",
                    "description": "уникальный код в проекте. Если не передать, Gigma создаст его автоматически."
                  },
                  "photo_id": {
                    "type": "integer",
                    "description": "ID файла-обложки."
                  },
                  "wholesale": {
                    "type": "boolean",
                    "description": "признак оптового режима."
                  },
                  "success_payment_url": {
                    "type": "string",
                    "description": "URL возврата после успешной оплаты."
                  }
                },
                "required": [
                  "name",
                  "is_website",
                  "branch_id",
                  "sales_strategy_id",
                  "code",
                  "photo_id",
                  "wholesale",
                  "success_payment_url"
                ]
              }
            }
          }
        }
      }
    },
    "/api/applications/{id}": {
      "get": {
        "summary": "Получение выбранного приложения",
        "operationId": "application-get",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "application": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный филиал",
                              "description": "название приложения"
                            }
                          },
                          "description": "объект филиала (`id`, `name`)"
                        },
                        "is_website": {
                          "type": "boolean",
                          "example": false,
                          "description": "является ли приложение сайтом"
                        },
                        "photo": {
                          "example": null,
                          "description": "объект файла-обложки (или `null`)"
                        },
                        "code": {
                          "type": "integer",
                          "example": 123456,
                          "description": "уникальный код приложения"
                        },
                        "name": {
                          "type": "string",
                          "example": "Интернет-магазин",
                          "description": "название приложения"
                        },
                        "is_token_active": {
                          "type": "boolean",
                          "example": true,
                          "description": "активен ли API-токен приложения"
                        },
                        "wholesale": {
                          "type": "boolean",
                          "example": false,
                          "description": "работает ли приложение в оптовом режиме"
                        },
                        "token": {
                          "type": "string",
                          "example": "<opaque_token>",
                          "description": "API-токен приложения для E-Commerce запросов"
                        },
                        "success_payment_url": {
                          "type": "string",
                          "example": "https://myshop.ru/success",
                          "format": "uri",
                          "description": "URL редиректа после успешной оплаты"
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3
                              },
                              "name": {
                                "type": "string",
                                "example": "Склад №1",
                                "description": "название приложения"
                              }
                            },
                            "description": "массив складов, привязанных к приложению"
                          },
                          "description": "массив складов, привязанных к приложению"
                        },
                        "sales_strategy": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Стандартная",
                              "description": "название приложения"
                            }
                          },
                          "description": "стратегия продаж (`id`, `name`)"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-get"
        }
      }
    },
    "/api/applications/{application}/subscription-nomenclatures/catalog": {
      "get": {
        "summary": "Каталог тарифов для настройки приложения",
        "operationId": "application-subscription-nomenclatures-catalog",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "nomenclature": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 34786
                              },
                              "name": {
                                "type": "string",
                                "example": "Uhoster — 1 месяц"
                              },
                              "parent_nomenclature_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "example": 34780,
                                "description": "ID родительского тарифа для варианта или `null`."
                              },
                              "variant_label": {
                                "type": "string",
                                "example": "1 месяц"
                              },
                              "variant_sort_order": {
                                "type": "integer",
                                "example": 10
                              },
                              "price": {
                                "type": "string",
                                "example": "490.00",
                                "format": "decimal",
                                "description": "цена тарифа. Строковый формат сохраняет точность денежных значений."
                              },
                              "billing_period_months": {
                                "type": "integer",
                                "example": 1
                              }
                            },
                            "description": "тариф из общего справочника проекта."
                          },
                          "assignment": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 42
                              },
                              "is_active": {
                                "type": "boolean",
                                "example": true
                              },
                              "sort_order": {
                                "type": "integer",
                                "example": 0,
                                "description": "порядок показа активных тарифов в клиентском каталоге."
                              }
                            },
                            "description": "привязка тарифа к этому приложению. `null` означает, что тариф ещё не добавлен; объект с `is_active: false` означает, что он добавлен, но выключен."
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "application_id": {
                          "type": "integer",
                          "example": 275,
                          "description": "Приложение. Актуальные значения получите из справочника.",
                          "x-gigma-dictionary": {
                            "dynamic": true,
                            "paths": [
                              "/api/applications"
                            ]
                          }
                        },
                        "subscription_catalog_configured": {
                          "type": "boolean",
                          "example": true,
                          "description": "включён ли у приложения режим управляемого каталога."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-subscription-nomenclatures-catalog"
        }
      }
    },
    "/api/applications/{application}/subscription-nomenclatures": {
      "post": {
        "summary": "Назначить подписочный тариф приложению",
        "operationId": "application-subscription-nomenclature-create",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-subscription-nomenclature-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 34786,
                    "description": "ID подписочного тарифа из management-каталога текущего проекта."
                  },
                  "is_active": {
                    "type": "boolean",
                    "example": true,
                    "description": "доступен ли тариф клиентам."
                  },
                  "sort_order": {
                    "type": "integer",
                    "example": 0,
                    "description": "порядок в каталоге."
                  }
                },
                "required": [
                  "nomenclature_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/applications/{application}/subscription-nomenclatures/{assignment}": {
      "patch": {
        "summary": "Изменить привязку подписочного тарифа",
        "operationId": "application-subscription-nomenclature-update",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "assignment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-subscription-nomenclature-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_active": {
                    "type": "boolean",
                    "example": false
                  },
                  "sort_order": {
                    "type": "integer",
                    "example": 10
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удалить привязку подписочного тарифа",
        "operationId": "application-subscription-nomenclature-delete",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "assignment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Subscription nomenclature assignment deleted"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-subscription-nomenclature-delete"
        }
      }
    },
    "/api/applications/{application}/webhooks": {
      "get": {
        "summary": "Получение списка вебхуков",
        "operationId": "application-webhooks-list",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhooks-list"
        }
      },
      "post": {
        "summary": "Создание вебхука",
        "operationId": "application-webhook-create",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "example": "order.paid",
                    "description": "сейчас поддерживается только `order.paid`."
                  },
                  "url": {
                    "type": "string",
                    "example": "https://service.example.com/api/webhooks/gigma",
                    "format": "uri",
                    "description": "публичный HTTPS URL receiver. Приватные IP, небезопасные redirects и локальные адреса отклоняются."
                  },
                  "secret": {
                    "type": "string",
                    "example": "<secret>",
                    "description": "общий секрет для HMAC-подписи. В ответах значение не раскрывается."
                  },
                  "headers": {
                    "type": "object",
                    "properties": {
                      "X-Service": {
                        "type": "string",
                        "example": "billing"
                      }
                    },
                    "description": "дополнительные разрешённые заголовки доставки."
                  },
                  "is_active": {
                    "type": "boolean",
                    "example": true,
                    "description": "включить доставку."
                  }
                },
                "required": [
                  "event",
                  "url",
                  "secret"
                ]
              }
            }
          }
        }
      }
    },
    "/api/applications/{application}/webhooks/{webhook}": {
      "get": {
        "summary": "Получение выбранного вебхука",
        "operationId": "application-webhook-get",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-get"
        }
      },
      "patch": {
        "summary": "Обновление вебхука",
        "operationId": "application-webhook-update",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_active": {
                    "type": "boolean",
                    "example": false,
                    "description": "включить или выключить доставку."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление вебхука",
        "operationId": "application-webhook-delete",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-delete"
        }
      }
    },
    "/api/applications/{application}/webhooks/{webhook}/deliveries": {
      "get": {
        "summary": "Получение доставок вебхука",
        "operationId": "application-webhook-deliveries",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-deliveries"
        }
      }
    },
    "/api/applications/{application}/webhooks/{webhook}/deliveries/{delivery}/resend": {
      "post": {
        "summary": "Повторная доставка вебхука",
        "operationId": "application-webhook-resend",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "delivery",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-resend"
        }
      }
    },
    "/api/applications/{application}/webhooks/{webhook}/rotate-secret": {
      "post": {
        "summary": "Ротация секрета вебхука",
        "operationId": "application-webhook-rotate-secret",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "application",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-webhook-rotate-secret"
        },
        "description": "Генерирует новый 64-символьный секрет для следующих доставок. Ротация ограничена одним запросом в 60 секунд."
      }
    },
    "/api/tables/applications/{id}/categories": {
      "get": {
        "summary": "Получение списка категорий приложения (табличное)",
        "operationId": "application-categories-table",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-categories-table"
        }
      }
    },
    "/api/applications/{id}/categories": {
      "get": {
        "summary": "Получение списка категорий приложения",
        "operationId": "application-categories-list",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-categories-list"
        }
      },
      "post": {
        "summary": "Добавление категории в приложение",
        "operationId": "application-category-add",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-category-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category_id": {
                    "type": "integer",
                    "description": "ID категории Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/categories",
                        "/api/counterparty/categories"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/applications/{id}/categories/{category_id}": {
      "get": {
        "summary": "Получение категории приложения",
        "operationId": "application-category-get",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-category-get"
        }
      },
      "delete": {
        "summary": "Удаление категории из приложения",
        "operationId": "application-category-delete",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-category-delete"
        }
      }
    },
    "/api/applications/{id}/categories/{category_id}/up": {
      "post": {
        "summary": "Повышение приоритета категории",
        "operationId": "application-category-up",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-category-up"
        }
      }
    },
    "/api/applications/{id}/categories/{category_id}/down": {
      "post": {
        "summary": "Понижение приоритета категории",
        "operationId": "application-category-down",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-category-down"
        }
      }
    },
    "/api/tables/applications/{id}/brands": {
      "get": {
        "summary": "Получение списка брендов приложения (табличное)",
        "operationId": "application-brands-table",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brands-table"
        }
      }
    },
    "/api/applications/{id}/brands": {
      "get": {
        "summary": "Получение списка брендов приложения",
        "operationId": "application-brands-list",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brands-list"
        }
      },
      "post": {
        "summary": "Добавление бренда в приложение",
        "operationId": "application-brand-add",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brand-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "integer",
                    "description": "ID бренда Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/brands",
                        "/api/counterparty/brands"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/applications/{id}/brands/{brand_id}": {
      "get": {
        "summary": "Получение бренда приложения",
        "operationId": "application-brand-get",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brand-get"
        }
      },
      "delete": {
        "summary": "Удаление бренда из приложения",
        "operationId": "application-brand-delete",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brand-delete"
        }
      }
    },
    "/api/applications/{id}/brands/{brand_id}/up": {
      "post": {
        "summary": "Повышение приоритета бренда",
        "operationId": "application-brand-up",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brand-up"
        }
      }
    },
    "/api/applications/{id}/brands/{brand_id}/down": {
      "post": {
        "summary": "Понижение приоритета бренда",
        "operationId": "application-brand-down",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-brand-down"
        }
      }
    },
    "/api/tables/applications/{id}/menu_items": {
      "get": {
        "summary": "Получение списка пунктов меню (табличное)",
        "operationId": "application-menu-items-table",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-items-table"
        }
      }
    },
    "/api/applications/{id}/menu_items": {
      "post": {
        "summary": "Создание пункта меню",
        "operationId": "application-menu-item-create",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-item-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "название пункта меню"
                  },
                  "slug": {
                    "type": "string",
                    "description": "slug"
                  },
                  "parent_id": {
                    "type": "integer",
                    "description": "ID родительского пункта"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "description": "ID файла аватара"
                  },
                  "preview_id": {
                    "type": "integer",
                    "description": "ID файла превью"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}": {
      "put": {
        "summary": "Обновление пункта меню",
        "operationId": "application-menu-item-update",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-item-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/applications/{id}/menu_items. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "название пункта меню"
                  },
                  "slug": {
                    "type": "string",
                    "description": "slug"
                  },
                  "parent_id": {
                    "type": "integer",
                    "description": "ID родительского пункта"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "description": "ID файла аватара"
                  },
                  "preview_id": {
                    "type": "integer",
                    "description": "ID файла превью"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление пункта меню",
        "operationId": "application-menu-item-delete",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-item-delete"
        }
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}/up": {
      "post": {
        "summary": "Повышение приоритета пункта меню",
        "operationId": "application-menu-item-up",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-item-up"
        }
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}/down": {
      "post": {
        "summary": "Понижение приоритета пункта меню",
        "operationId": "application-menu-item-down",
        "tags": [
          "Платформа / Приложения и webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Приложения/#application-menu-item-down"
        }
      }
    },
    "/api/tables/categories": {
      "get": {
        "summary": "Получение списка категорий",
        "operationId": "categories-list",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "текущая страница (пагинация)"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "количество элементов на странице"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "фильтр по дате добавления (от)"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "фильтр по дате добавления (до)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#categories-list"
        }
      }
    },
    "/api/tables/categories/{id}": {
      "get": {
        "summary": "Получение выбранной категории",
        "operationId": "category-get",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#category-get"
        }
      }
    },
    "/api/categories/{id}": {
      "put": {
        "summary": "Обновление выбранной категории",
        "operationId": "category-update",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#category-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "уникальный системный код"
                  },
                  "name": {
                    "type": "string",
                    "description": "название категории"
                  },
                  "description": {
                    "type": "string",
                    "description": "описание в формате HTML"
                  },
                  "parent_id": {
                    "type": "integer",
                    "description": "родительская категория"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "description": "ID файла аватара"
                  },
                  "photo_id": {
                    "type": "integer",
                    "description": "ID файла фотографии"
                  },
                  "tag_id[]": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "массив ID тегов"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories": {
      "post": {
        "summary": "Добавление категории",
        "operationId": "category-add",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17
                        },
                        "code": {
                          "type": "string",
                          "example": "CAT-001"
                        },
                        "name": {
                          "type": "string",
                          "example": "Косметика"
                        },
                        "description": {
                          "type": "string",
                          "example": "<p>Категория косметической продукции</p>"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Товары для дома"
                            }
                          }
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/abc.jpg",
                              "format": "uri"
                            }
                          }
                        },
                        "photo": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 43
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/def.jpg",
                              "format": "uri"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "новинка"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#category-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "CAT-001",
                    "description": "уникальный системный код категории"
                  },
                  "name": {
                    "type": "string",
                    "example": "Косметика",
                    "description": "название категории"
                  },
                  "description": {
                    "type": "string",
                    "example": "<p>Категория косметической продукции</p>",
                    "description": "описание в формате HTML"
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительской категории (для вложенности)"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID файла аватара (из `POST /api/files`)"
                  },
                  "photo_id": {
                    "type": "integer",
                    "example": 43,
                    "description": "ID файла основной фотографии"
                  },
                  "tag_id": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID тегов"
                    },
                    "description": "массив ID тегов"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/categories/{id}/history": {
      "get": {
        "summary": "Получение истории изменений категории",
        "operationId": "category-history",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaravelPaginator"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#category-history"
        }
      }
    },
    "/api/tags": {
      "get": {
        "summary": "Получение списка тегов",
        "operationId": "tags-list",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#tags-list"
        }
      }
    },
    "/api/nomenclature_types": {
      "get": {
        "summary": "Получение списка типов номенклатуры",
        "operationId": "nomenclature-types",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-types"
        }
      }
    },
    "/api/nomenclature_kinds": {
      "get": {
        "summary": "Получение списка видов номенклатуры",
        "operationId": "nomenclature-kinds",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-kinds"
        }
      }
    },
    "/api/tables/nomenclatures": {
      "get": {
        "summary": "Получение списка номенклатуры (табличное представление)",
        "operationId": "nomenclatures-table",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "type_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "фильтр по ID типов"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "kind_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "фильтр по ID видов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/nomenclature_kinds"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "is_import",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "boolean (1 — импортные, 0 — отечественные)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclatures-table"
        }
      }
    },
    "/api/nomenclatures": {
      "get": {
        "summary": "Получение списка номенклатуры",
        "operationId": "nomenclatures-list",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclatures-list"
        }
      },
      "post": {
        "summary": "Добавление позиции номенклатуры",
        "operationId": "nomenclature-add",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nomenclature": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 100
                        },
                        "code": {
                          "type": "string",
                          "example": "SKU-001"
                        },
                        "name": {
                          "type": "string",
                          "example": "Крем для лица «Нежность»"
                        },
                        "kind": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Товар"
                            }
                          }
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Простой"
                            }
                          }
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Штука"
                            }
                          }
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "rate": {
                              "type": "integer",
                              "example": 20
                            }
                          }
                        },
                        "price": {
                          "type": "string",
                          "example": "1000.00",
                          "format": "decimal"
                        },
                        "cost_price": {
                          "type": "string",
                          "example": "700.00",
                          "format": "decimal"
                        },
                        "markup": {
                          "type": "integer",
                          "example": 30
                        },
                        "discount": {
                          "type": "integer",
                          "example": 0
                        },
                        "category": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 17
                            },
                            "name": {
                              "type": "string",
                              "example": "Косметика"
                            }
                          }
                        },
                        "brand": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 7
                            },
                            "name": {
                              "type": "string",
                              "example": "Nivea"
                            }
                          }
                        },
                        "country": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Россия"
                            }
                          }
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный филиал"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "<p>...</p>"
                        },
                        "specification": {
                          "type": "string",
                          "example": "<p>...</p>"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/avatar.jpg",
                              "format": "uri"
                            }
                          }
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 43
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/preview.jpg",
                              "format": "uri"
                            }
                          }
                        },
                        "photos": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 44
                              },
                              "path": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/p1.jpg",
                                "format": "uri"
                              },
                              "order": {
                                "type": "integer",
                                "example": 1
                              }
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "новинка"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "SKU-001",
                    "description": "уникальный SKU позиции (рекомендуется ставить вручную)"
                  },
                  "name": {
                    "type": "string",
                    "example": "Крем для лица «Нежность»",
                    "description": "наименование позиции"
                  },
                  "kind_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID вида (1=Услуга, 2=Товар; `GET /api/nomenclature_kinds`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/nomenclature_kinds"
                      ]
                    }
                  },
                  "type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа (`GET /api/nomenclature_types`)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единицы измерения (`GET /api/storage_units` — **не** `/api/units`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID ставки НДС (`GET /api/vats`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  },
                  "price": {
                    "type": "string",
                    "example": "1000.00",
                    "format": "decimal",
                    "description": "цена в формате decimal-string, 2 знака (`\"1000.00\"`). Для услуг — обязательно по бизнес-логике."
                  },
                  "category_id": {
                    "type": "integer",
                    "example": 17,
                    "description": "ID категории (`GET /api/categories`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/categories",
                        "/api/counterparty/categories"
                      ]
                    }
                  },
                  "brand_id": {
                    "type": "integer",
                    "example": 7,
                    "description": "ID бренда (`GET /api/brands`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/brands",
                        "/api/counterparty/brands"
                      ]
                    }
                  },
                  "country_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID страны производства Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/countries",
                        "/api/counterparty/countries"
                      ]
                    }
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID бизнеса/филиала Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "description": {
                    "type": "string",
                    "example": "<p>Увлажняющий крем с гиалуроновой кислотой.</p>",
                    "description": "HTML-описание для карточки"
                  },
                  "specification": {
                    "type": "string",
                    "example": "<p>Объём: 50 мл. Срок годности: 24 месяца.</p>",
                    "description": "HTML-характеристики"
                  },
                  "cost_price": {
                    "type": "string",
                    "example": "700.00",
                    "format": "decimal",
                    "description": "себестоимость, decimal-string"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID файла-аватара (из `POST /api/files` c `file_type_id=2`)"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 43,
                    "description": "ID файла превью-картинки"
                  },
                  "photos": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "photo_id": {
                          "type": "integer",
                          "example": 44
                        },
                        "order": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "массив дополнительных фото: `[{photo_id, order}]`"
                    },
                    "description": "массив дополнительных фото: `[{photo_id, order}]`"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID тегов"
                    },
                    "description": "массив ID тегов"
                  }
                },
                "required": [
                  "name",
                  "kind_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/nomenclatures/{id}": {
      "put": {
        "summary": "Обновление позиции номенклатуры",
        "operationId": "nomenclature-update",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/nomenclatures. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "SKU-001",
                    "description": "уникальный SKU позиции (рекомендуется ставить вручную)"
                  },
                  "name": {
                    "type": "string",
                    "example": "Крем для лица «Нежность»",
                    "description": "наименование позиции"
                  },
                  "kind_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID вида (1=Услуга, 2=Товар; `GET /api/nomenclature_kinds`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/nomenclature_kinds"
                      ]
                    }
                  },
                  "type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа (`GET /api/nomenclature_types`)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единицы измерения (`GET /api/storage_units` — **не** `/api/units`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID ставки НДС (`GET /api/vats`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  },
                  "price": {
                    "type": "string",
                    "example": "1000.00",
                    "format": "decimal",
                    "description": "цена в формате decimal-string, 2 знака (`\"1000.00\"`). Для услуг — обязательно по бизнес-логике."
                  },
                  "category_id": {
                    "type": "integer",
                    "example": 17,
                    "description": "ID категории (`GET /api/categories`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/categories",
                        "/api/counterparty/categories"
                      ]
                    }
                  },
                  "brand_id": {
                    "type": "integer",
                    "example": 7,
                    "description": "ID бренда (`GET /api/brands`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/brands",
                        "/api/counterparty/brands"
                      ]
                    }
                  },
                  "country_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID страны производства Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/countries",
                        "/api/counterparty/countries"
                      ]
                    }
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID бизнеса/филиала Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "description": {
                    "type": "string",
                    "example": "<p>Увлажняющий крем с гиалуроновой кислотой.</p>",
                    "description": "HTML-описание для карточки"
                  },
                  "specification": {
                    "type": "string",
                    "example": "<p>Объём: 50 мл. Срок годности: 24 месяца.</p>",
                    "description": "HTML-характеристики"
                  },
                  "cost_price": {
                    "type": "string",
                    "example": "700.00",
                    "format": "decimal",
                    "description": "себестоимость, decimal-string"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID файла-аватара (из `POST /api/files` c `file_type_id=2`)"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 43,
                    "description": "ID файла превью-картинки"
                  },
                  "photos": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "photo_id": {
                          "type": "integer",
                          "example": 44
                        },
                        "order": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "массив дополнительных фото: `[{photo_id, order}]`"
                    },
                    "description": "массив дополнительных фото: `[{photo_id, order}]`"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID тегов"
                    },
                    "description": "массив ID тегов"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получение выбранной позиции номенклатуры",
        "operationId": "nomenclature-get",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-get"
        }
      }
    },
    "/api/nomenclatures/{id}/history": {
      "get": {
        "summary": "Получение истории изменений позиции номенклатуры",
        "operationId": "nomenclature-history",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaravelPaginator"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-history"
        }
      }
    },
    "/api/nomenclatures/export": {
      "post": {
        "summary": "Экспорт файла номенклатуры",
        "operationId": "nomenclature-export",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-export"
        }
      }
    },
    "/api/nomenclatures/import": {
      "post": {
        "summary": "Импорт файла номенклатуры",
        "operationId": "nomenclature-import",
        "tags": [
          "Платформа / Каталог товаров и услуг"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Номенклатура/#nomenclature-import"
        }
      }
    },
    "/api/tables/warehouses": {
      "get": {
        "summary": "Получение списка складов",
        "operationId": "list-warehouses",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "owned_by_us",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "иерархия (принадлежность) склада: свой (true), чужой (false)"
            }
          },
          {
            "name": "type_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID типов хранимых товаров"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "city_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID городов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/cities"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "текущая страница (для пагинации)"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "кол-во элементов на странице"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "\"дата с...\" (от даты добавления в систему)"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "\"дата по...\" (от даты добавления в систему)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 81,
                            "description": "первичный ключ (номер склада)"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 11
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        }
                      }
                    },
                    "warehouses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 3,
                            "description": "первичный ключ (номер склада)"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Коледино WB"
                              }
                            },
                            "description": "название склада"
                          },
                          "owner": {
                            "type": "string",
                            "example": "Чужой",
                            "description": "принадлежность склада (свой/чужой)"
                          },
                          "city": {
                            "type": "string",
                            "example": "Москва",
                            "description": "город"
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "добавил в систему"
                          },
                          "storage_capacity": {
                            "type": "integer",
                            "example": 5000000,
                            "description": "объем склада"
                          },
                          "storage_unit": {
                            "type": "string",
                            "example": "Литр",
                            "description": "единицы измерения"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#list-warehouses"
        }
      }
    },
    "/api/warehouses/{id}": {
      "get": {
        "summary": "Получение выбранного склада",
        "operationId": "get-warehouse",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ (номер склада)"
                        },
                        "name": {
                          "type": "string",
                          "example": "Подольск"
                        },
                        "avatar": {
                          "example": null,
                          "description": "объект с информацией об аватаре/фотографии склада (или `null`)"
                        },
                        "code": {
                          "type": "integer",
                          "example": 1,
                          "description": "уникальный код склада"
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false,
                          "description": "принадлежность склада (свой/чужой)"
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                          "description": "адрес склада"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000,
                          "description": "объем склада"
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер склада)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер склада)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва"
                            },
                            "avatar": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "объект с информацией об аватаре/фотографии склада (или `null`)"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-19T09:18:41.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о городе"
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54,
                              "description": "первичный ключ (номер склада)"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "первичный ключ (номер склада)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик"
                                },
                                "avatar": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "объект с информацией об аватаре/фотографии склада (или `null`)"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер склада)"
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём"
                                }
                              }
                            },
                            "avatar": {
                              "example": null,
                              "description": "объект с информацией об аватаре/фотографии склада (или `null`)"
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\""
                            },
                            "registered_at": {
                              "type": "string",
                              "example": "2008-10-20",
                              "format": "date"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "example": null
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "email": {
                              "type": "string",
                              "example": "user@example.test"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-06-11T15:00:33.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-06-11T19:33:38.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о контрагенте"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#get-warehouse"
        }
      },
      "put": {
        "summary": "Редактирование склада",
        "operationId": "update-warehouse",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Коледино WB"
                        },
                        "avatar": {
                          "example": null
                        },
                        "code": {
                          "type": "integer",
                          "example": 1
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          }
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-19T09:18:41.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём"
                                }
                              }
                            },
                            "avatar": {
                              "example": null
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\""
                            },
                            "registered_at": {
                              "type": "string",
                              "example": "2008-10-20",
                              "format": "date"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "example": null
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "email": {
                              "type": "string",
                              "example": "user@example.test"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-06-11T15:00:33.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-06-11T19:33:38.000000Z",
                              "format": "date-time"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#update-warehouse"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла аватара/фотографии склада (в ответе возвращается как поле `avatar`)"
                  },
                  "code": {
                    "type": "integer",
                    "example": 1,
                    "description": "уникальный код склада"
                  },
                  "name": {
                    "type": "string",
                    "example": "Коледино WB",
                    "description": "название склада"
                  },
                  "owned_by_us": {
                    "type": "boolean",
                    "example": false,
                    "description": "принадлежность склада (свой/чужой)"
                  },
                  "address": {
                    "type": "string",
                    "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                    "description": "адрес склада"
                  },
                  "storage_capacity": {
                    "type": "integer",
                    "example": 5000000,
                    "description": "объем склада (целочисленное значение)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единиц измерения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "city_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID города Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/cities"
                      ]
                    }
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 54,
                    "description": "ID поставщика (использовать с ID типа = 2 \"Поставщик\")"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление склада",
        "operationId": "delete-warehouse",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Warehouse deleted.",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#delete-warehouse"
        }
      }
    },
    "/api/warehouses": {
      "post": {
        "summary": "Добавление склада",
        "operationId": "create-warehouse",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Подольск"
                        },
                        "avatar": {
                          "example": null
                        },
                        "code": {
                          "type": "integer",
                          "example": 1
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          }
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-19T09:18:41.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём"
                                }
                              }
                            },
                            "avatar": {
                              "example": null
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\""
                            },
                            "registered_at": {
                              "type": "string",
                              "example": "2008-10-20",
                              "format": "date"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "example": null
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "email": {
                              "type": "string",
                              "example": "user@example.test"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-06-11T15:00:33.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-06-11T19:33:38.000000Z",
                              "format": "date-time"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#create-warehouse"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла аватара/фотографии склада (в ответе возвращается как поле `avatar`)"
                  },
                  "code": {
                    "type": "integer",
                    "example": 1,
                    "description": "уникальный код склада"
                  },
                  "name": {
                    "type": "string",
                    "example": "Коледино WB",
                    "description": "название склада"
                  },
                  "owned_by_us": {
                    "type": "boolean",
                    "example": false,
                    "description": "принадлежность склада (свой/чужой)"
                  },
                  "address": {
                    "type": "string",
                    "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                    "description": "адрес склада"
                  },
                  "storage_capacity": {
                    "type": "integer",
                    "example": 5000000,
                    "description": "объем склада (целочисленное значение)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единиц измерения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "city_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID города Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/cities"
                      ]
                    }
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 54,
                    "description": "ID поставщика"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{id}/integrations": {
      "get": {
        "summary": "Получение списка интеграций",
        "operationId": "list-integrations",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "integration_id": {
                            "type": "integer",
                            "example": 10,
                            "description": "ID интеграции"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wildberries",
                            "description": "название интеграции"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri",
                            "description": "URL-адрес фотографии"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 0,
                            "description": "статус (false — неактивна; true — активна)"
                          }
                        }
                      }
                    },
                    "integrationsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#list-integrations"
        }
      }
    },
    "/api/warehouses/{warehouse_id}/integrations/{id}": {
      "put": {
        "summary": "Обновление статуса выбранной интеграции",
        "operationId": "update-integration-status",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "integration_id": {
                          "type": "integer",
                          "example": 10
                        },
                        "name": {
                          "type": "string",
                          "example": "Wildberries"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#update-integration-status"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_active": {
                    "type": "integer",
                    "example": 1,
                    "description": "булевый флаг, означающий текущий статус интеграции"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{warehouse_id}/integrations/{id}/parameters": {
      "get": {
        "summary": "Получение списка параметров интеграции",
        "operationId": "list-integration-parameters",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2,
                            "description": "первичный ключ"
                          },
                          "key_1": {
                            "type": "string",
                            "example": "login",
                            "description": "ключ 1"
                          },
                          "description_1": {
                            "type": "string",
                            "example": "Логин/ID",
                            "description": "описание 1"
                          },
                          "key_2": {
                            "type": "string",
                            "example": "password",
                            "description": "ключ 2"
                          },
                          "description_2": {
                            "type": "string",
                            "example": "Пароль",
                            "description": "описание 2"
                          },
                          "value_1": {
                            "type": "string",
                            "example": "dsfsdfdsf",
                            "description": "значение 1"
                          },
                          "value_2": {
                            "type": "string",
                            "example": "sdfdsfsd",
                            "description": "значение 2"
                          }
                        }
                      }
                    },
                    "parametersCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#list-integration-parameters"
        }
      },
      "post": {
        "summary": "Добавление параметров для выбранной интеграции",
        "operationId": "add-integration-parameters",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "key_1": {
                          "type": "string",
                          "example": "login"
                        },
                        "description_1": {
                          "type": "string",
                          "example": "Логин/ID"
                        },
                        "key_2": {
                          "type": "string",
                          "example": "password"
                        },
                        "description_2": {
                          "type": "string",
                          "example": "Пароль"
                        },
                        "value_1": {
                          "type": "string",
                          "example": "dsfsdfdsf"
                        },
                        "value_2": {
                          "type": "string",
                          "example": "sdfdsfsd"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#add-integration-parameters"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_parameter_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID параметра интеграции"
                  },
                  "value_1": {
                    "type": "string",
                    "example": "83432434234",
                    "description": "значение 1"
                  },
                  "value_2": {
                    "type": "string",
                    "example": "sdfdsxcvxcvfsd",
                    "description": "значение 2"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{warehouse_id}/integrations/{integration_id}/parameters/{id}": {
      "post": {
        "summary": "Удаление параметров из выбранной интеграции",
        "operationId": "delete-integration-parameters",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Parameter successfully deleted.",
                      "description": "информационное сообщение"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#delete-integration-parameters"
        }
      }
    },
    "/api/warehouses/{id}/history": {
      "get": {
        "summary": "Получение истории изменений",
        "operationId": "warehouse-history",
        "tags": [
          "Платформа / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "histories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 283,
                            "description": "первичный ключ"
                          },
                          "icon": {
                            "type": "string",
                            "example": "check",
                            "description": "иконка"
                          },
                          "color": {
                            "type": "string",
                            "example": "primary",
                            "description": "цвет"
                          },
                          "title": {
                            "type": "string",
                            "example": "Создание",
                            "description": "заголовок"
                          },
                          "description": {
                            "type": "string",
                            "example": "Создание: Полищук Артём",
                            "description": "описание"
                          },
                          "datetime": {
                            "type": "string",
                            "example": "15.07.2024 05:46",
                            "description": "дата выполнения действия"
                          }
                        }
                      }
                    },
                    "historiesCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Склады/#warehouse-history"
        }
      }
    },
    "/api/tables/inventories": {
      "get": {
        "summary": "Получение списка остатков (табличное представление)",
        "operationId": "inventories-table",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "owned_by_us",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "иерархия складов (true/false)"
            }
          },
          {
            "name": "warehouse_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID складов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/warehouses"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "type_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID типов товаров"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "city_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID городов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/cities"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "brand_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID производителей Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/brands",
                  "/api/counterparty/brands"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "vat_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "ID НДС Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/vats"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "application_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "ID приложения Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/applications"
                ]
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesEnvelope"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventories-table"
        }
      }
    },
    "/api/inventories": {
      "get": {
        "summary": "Получение списка остатков (JSON)",
        "operationId": "inventories-list",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventories-list"
        },
        "description": "⚠ **Backend bug:** на боевых данных возвращает `IncompleteRead(0 bytes read)` — запрос обрывается без ответа. Причина: нет пагинации (`->get()` без `->paginate()`), при большом каталоге сервер не успевает отдать весь ответ. Пока не починено — используй табличный эндпоинт с пагинацией (`GET /api/tables/inventories?per_page=50`)."
      },
      "post": {
        "summary": "Создание записи остатка",
        "operationId": "inventory-create",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inventory": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 200
                        },
                        "code": {
                          "type": "string",
                          "example": "INV-001"
                        },
                        "warehouse": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный склад"
                            }
                          }
                        },
                        "nomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 100
                            },
                            "name": {
                              "type": "string",
                              "example": "Крем для лица «Нежность»"
                            },
                            "code": {
                              "type": "string",
                              "example": "SKU-001"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/avatar.jpg",
                              "format": "uri"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО Поставщик"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7712345678"
                            },
                            "type_id": {
                              "type": "integer",
                              "example": 1
                            }
                          },
                          "description": "поставщик: `id`, `name`, `inn`, `type_id`"
                        },
                        "invoice": {
                          "type": "object",
                          "properties": {
                            "number": {
                              "type": "string",
                              "example": "РН-001"
                            },
                            "date": {
                              "type": "string",
                              "example": "2026-05-16",
                              "format": "date"
                            },
                            "row_number": {
                              "type": "integer",
                              "example": 1
                            }
                          },
                          "description": "реквизиты накладной: `number`, `date`, `row_number`"
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "НДС 20%"
                            }
                          },
                          "description": "ставка НДС как объект `{id, name}` (не просто число)"
                        },
                        "vat_rate": {
                          "type": "string",
                          "example": "20%",
                          "description": "строковое представление ставки («20%», «10%», «0%»)"
                        },
                        "vat_amount": {
                          "type": "string",
                          "example": "166.67",
                          "format": "decimal",
                          "description": "сумма НДС по строке, decimal-string"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 50
                        },
                        "price": {
                          "type": "string",
                          "example": "1000.00",
                          "format": "decimal"
                        },
                        "line_total_without_vat": {
                          "type": "string",
                          "example": "50000.00",
                          "format": "decimal",
                          "description": "итого по строке без НДС"
                        },
                        "line_total_with_vat": {
                          "type": "string",
                          "example": "50000.00",
                          "format": "decimal",
                          "description": "итого по строке с НДС"
                        },
                        "currency_code": {
                          "type": "string",
                          "example": "RUB",
                          "description": "код валюты ISO 4217 (`\"RUB\"`)"
                        },
                        "discount": {
                          "type": "integer",
                          "example": 0
                        },
                        "markup": {
                          "type": "integer",
                          "example": 30
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-05-16T07:00:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventory-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "INV-001",
                    "description": "код позиции остатка"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID склада (`GET /api/warehouses`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/warehouses"
                      ]
                    }
                  },
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 100,
                    "description": "ID номенклатуры (`GET /api/nomenclatures`)"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID ставки НДС (`GET /api/vats`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 50,
                    "description": "количество в штуках, неотрицательное целое"
                  },
                  "price": {
                    "type": "string",
                    "example": "1000.00",
                    "format": "decimal",
                    "description": "цена в формате decimal-string, 2 знака (`\"1000.00\"`)"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки, 0–100"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  }
                },
                "required": [
                  "warehouse_id",
                  "nomenclature_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/inventories/{id}": {
      "put": {
        "summary": "Обновление записи остатка",
        "operationId": "inventory-update",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventory-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/inventories. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "INV-001",
                    "description": "код позиции остатка"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID склада (`GET /api/warehouses`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/warehouses"
                      ]
                    }
                  },
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 100,
                    "description": "ID номенклатуры (`GET /api/nomenclatures`)"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID ставки НДС (`GET /api/vats`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 50,
                    "description": "количество в штуках, неотрицательное целое"
                  },
                  "price": {
                    "type": "string",
                    "example": "1000.00",
                    "format": "decimal",
                    "description": "цена в формате decimal-string, 2 знака (`\"1000.00\"`)"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки, 0–100"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получение выбранного остатка",
        "operationId": "inventory-get",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventory-get"
        }
      }
    },
    "/api/inventories/{id}/history": {
      "get": {
        "summary": "Получение истории изменений остатка",
        "operationId": "inventory-history",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaravelPaginator"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventory-history"
        }
      }
    },
    "/api/inventories/upload": {
      "post": {
        "summary": "Импорт остатков",
        "operationId": "inventories-import",
        "tags": [
          "Платформа / Остатки и импорт"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Import successful"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Остатки/#inventories-import"
        },
        "description": "Два режима в зависимости от `Content-Type`. В обоих режимах `warehouse_id` обязателен. **Режим А** (`multipart/form-data`): передаётся `file` — Excel `.xmr`. **Режим Б** (`application/json`): передаётся `items[]` с полями накладной. ⚠ Реальный minimum (сверено через `POST {}` → 422): `warehouse_id` + (`file` **или** `items[]` со всеми полями ниже).",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouse_id": {
                    "type": "integer",
                    "description": "ID склада. Обязателен в обоих режимах. Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/warehouses"
                      ]
                    }
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Excel-файл импорта."
                  }
                },
                "required": [
                  "warehouse_id",
                  "file"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "warehouse_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID склада (`GET /api/warehouses`). Обязателен в обоих режимах. Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/warehouses"
                      ]
                    }
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "РН-001",
                    "description": "номер накладной; обязателен в режиме Б."
                  },
                  "invoice_date": {
                    "type": "string",
                    "example": "2026-05-16",
                    "format": "date",
                    "description": "дата накладной ISO 8601 (`\"2026-05-16\"`); обязателен в режиме Б."
                  },
                  "supplier_inn": {
                    "type": "string",
                    "example": "7712345678",
                    "description": "ИНН поставщика; обязателен в режиме Б."
                  },
                  "supplier_name": {
                    "type": "string",
                    "example": "ООО Поставщик",
                    "description": "наименование поставщика; обязателен в режиме Б."
                  },
                  "currency_code": {
                    "type": "string",
                    "example": "RUB",
                    "description": "код валюты ISO 4217 (`\"RUB\"`); обязателен в режиме Б."
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "row_number": {
                          "type": "integer",
                          "example": 1,
                          "description": "порядковый номер строки"
                        },
                        "item_name": {
                          "type": "string",
                          "example": "Микрофон Shure SM58",
                          "description": "наименование товара"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 5,
                          "description": "количество"
                        },
                        "price": {
                          "type": "string",
                          "example": "4000.00",
                          "format": "decimal",
                          "description": "цена за единицу, decimal-string (`\"4000.00\"`)"
                        },
                        "sum_without_vat": {
                          "type": "string",
                          "example": "20000.00",
                          "format": "decimal",
                          "description": "сумма без НДС, decimal-string"
                        },
                        "sum_with_vat": {
                          "type": "string",
                          "example": "20000.00",
                          "format": "decimal",
                          "description": "сумма с НДС, decimal-string"
                        },
                        "vat_rate": {
                          "type": "string",
                          "example": "0%",
                          "description": "ставка НДС: `\"0%\"`, `\"10%\"`, `\"20%\"`"
                        }
                      },
                      "required": [
                        "row_number",
                        "item_name",
                        "quantity",
                        "price",
                        "sum_without_vat",
                        "sum_with_vat",
                        "vat_rate"
                      ],
                      "description": "строки накладной; обязателен в режиме Б. Каждая строка:"
                    },
                    "description": "строки накладной; обязателен в режиме Б. Каждая строка:"
                  }
                },
                "required": [
                  "warehouse_id",
                  "invoice_number",
                  "invoice_date",
                  "supplier_inn",
                  "supplier_name",
                  "currency_code",
                  "items"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tables/reservations": {
      "get": {
        "summary": "Таблица резервов",
        "operationId": "reservations-table",
        "tags": [
          "Платформа / Резервы товаров"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "фильтр по ID заказа"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "«дата с…» (от даты бронирования)"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "«дата по…»"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "пагинация"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 178
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 22
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "code"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "Код"
                          }
                        }
                      }
                    },
                    "reservations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "integer",
                                "example": 193
                              },
                              "url": {
                                "type": "string",
                                "example": "/inventories/list-inventories/57013"
                              }
                            }
                          },
                          "code": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "string",
                                "example": "1"
                              },
                              "url": {
                                "type": "string",
                                "example": "/inventories/list-inventories/57013"
                              }
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2025-03-07T11:08:52.000000Z",
                            "format": "date-time"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/FCusoYbrnJTaiN8C0bWmNt4HxZLru0ItXEBaH9UW.jpg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Line Repair Nutrient Bio Satin Serum Сыворотка «Био-Сатин», 30 мл"
                              },
                              "link": {
                                "type": "string",
                                "example": "/inventories/list-inventories/57013"
                              }
                            }
                          },
                          "counterparty": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Крушанов Александр"
                              },
                              "link": {
                                "type": "string",
                                "example": "/counterparty/list-counterparty/121"
                              }
                            }
                          },
                          "warehouse": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/tsLs3JTSLCTFgSyDsdtxFsweHEbTTvn0HeqUepNr.webp",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Склад для приложения"
                              },
                              "link": {
                                "type": "string",
                                "example": "/warehouses/list-warehouses/50"
                              }
                            }
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Сей момент"
                              },
                              "link": {
                                "type": "string",
                                "example": "/ecommerce/list-ecommerce/37"
                              }
                            }
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 1
                          },
                          "price": {
                            "type": "string",
                            "example": "2100.00",
                            "format": "decimal"
                          },
                          "expired_at": {
                            "type": "string",
                            "example": "2025-03-08 08:28:02"
                          },
                          "is_active": {
                            "type": "string",
                            "example": "Да"
                          },
                          "creator": {
                            "type": "string",
                            "example": "-"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "стандартный Laravel-пагинатор"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Резервирование/#reservations-table"
        }
      }
    },
    "/api/reservations/{id}": {
      "delete": {
        "summary": "Удаление резерва ⚠ endpoint не существует на бэке",
        "operationId": "reservation-delete",
        "tags": [
          "Платформа / Резервы товаров"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Резервирование/#reservation-delete"
        },
        "description": "⚠ **Этот endpoint описан исторически, но реально возвращает 404.** В `itecho-erp-backend` `ReservationController` имеет только метод `tableIndex` (`routes/api.php`: `Route::get('reservations', ...)`). Полного CRUD для резерваций НЕТ. **Как удалять резерв:** через позицию заказа — `DELETE /api/orders/{order}/nomenclatures/{nomenclatureId}` (это удаляет запись `Reservation`, на которой биндится `{nomenclatureId}` — см. erp-rules §18.7)."
      }
    },
    "/api/sales_strategies": {
      "get": {
        "summary": "Список стратегий продаж",
        "operationId": "sales-strategies-list",
        "tags": [
          "Платформа / Стратегии продаж"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesStrategies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Продать остатки"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-06-20T10:01:33.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "salesStrategiesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Стратегии продаж/#sales-strategies-list"
        }
      }
    },
    "/api/sales_strategies/{id}": {
      "get": {
        "summary": "Стратегия продаж по ID",
        "operationId": "sales-strategy-get",
        "tags": [
          "Платформа / Стратегии продаж"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesStrategy": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "Продать остатки"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-06-20T10:01:33.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Стратегии продаж/#sales-strategy-get"
        }
      }
    },
    "/api/promotions": {
      "get": {
        "summary": "Получение списка промоакций",
        "operationId": "promotions-list",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "promotions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ промоакции"
                          },
                          "name": {
                            "type": "string",
                            "example": "Тестовая промоакция",
                            "description": "название промоакции"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri",
                            "description": "URL изображения"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-07-27T18:13:40.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "promotionsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#promotions-list"
        }
      }
    },
    "/api/discounts": {
      "get": {
        "summary": "Получение списка скидок",
        "operationId": "discounts-list",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "фильтр по статусу"
            }
          },
          {
            "name": "application_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "фильтр по приложению Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/applications"
                ]
              }
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discounts-list"
        }
      },
      "post": {
        "summary": "Создание скидки",
        "operationId": "discount-create",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "название скидки"
                  },
                  "application_id": {
                    "type": "integer",
                    "description": "ID приложения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "discount_type": {
                    "type": "string",
                    "description": "тип: `\"percent\"` | `\"fixed\"`"
                  },
                  "discount_value": {
                    "type": "string",
                    "description": "значение скидки, decimal-string"
                  },
                  "code": {
                    "type": "string",
                    "description": "промокод"
                  },
                  "description": {
                    "type": "string",
                    "description": "описание"
                  },
                  "min_order_amount": {
                    "type": "string",
                    "description": "минимальная сумма заказа для применения"
                  },
                  "max_discount_amount": {
                    "type": "string",
                    "description": "максимальная сумма скидки"
                  },
                  "total_usage_limit": {
                    "type": "integer",
                    "description": "лимит использований всего"
                  },
                  "per_client_usage_limit": {
                    "type": "integer",
                    "description": "лимит использований на одного клиента"
                  },
                  "audience": {
                    "type": "string",
                    "description": "аудитория: `\"all\"` | `\"new\"` | `\"returning\"`"
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date",
                    "description": "дата начала ISO 8601"
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date",
                    "description": "дата окончания ISO 8601"
                  }
                },
                "required": [
                  "name",
                  "application_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/discounts/{id}": {
      "get": {
        "summary": "Получение выбранной скидки",
        "operationId": "discount-get",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "discount": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "project_id": {
                          "type": "integer",
                          "example": 10
                        },
                        "application_id": {
                          "type": "integer",
                          "example": 1,
                          "description": "Приложение. Актуальные значения получите из справочника.",
                          "x-gigma-dictionary": {
                            "dynamic": true,
                            "paths": [
                              "/api/applications"
                            ]
                          }
                        },
                        "branch_id": {
                          "type": "integer",
                          "example": 5,
                          "description": "Бизнес или филиал. Актуальные значения получите из справочника.",
                          "x-gigma-dictionary": {
                            "dynamic": true,
                            "paths": [
                              "/api/branches"
                            ]
                          }
                        },
                        "name": {
                          "type": "string",
                          "example": "Скидка 10% на первый заказ"
                        },
                        "code": {
                          "type": "string",
                          "example": "FIRST10"
                        },
                        "description": {
                          "type": "string",
                          "example": "Для новых покупателей"
                        },
                        "status": {
                          "type": "string",
                          "example": "active",
                          "description": "статус скидки (задан вручную): `\"active\"` | `\"paused\"` | `\"archived\"`"
                        },
                        "effective_status": {
                          "type": "string",
                          "example": "active",
                          "description": "реальный статус с учётом дат и лимитов (может отличаться от `status`)"
                        },
                        "discount_type": {
                          "type": "string",
                          "example": "percent",
                          "description": "тип скидки: `\"percent\"` (процент) | `\"fixed\"` (фиксированная сумма)"
                        },
                        "discount_value": {
                          "type": "string",
                          "example": "10.00",
                          "format": "decimal",
                          "description": "значение скидки, decimal-string"
                        },
                        "min_order_amount": {
                          "type": "string",
                          "example": "500.00",
                          "format": "decimal"
                        },
                        "max_discount_amount": {
                          "type": "string",
                          "example": "1000.00",
                          "format": "decimal"
                        },
                        "total_usage_limit": {
                          "type": "integer",
                          "example": 100
                        },
                        "total_used_count": {
                          "type": "integer",
                          "example": 5,
                          "description": "сколько раз скидка уже применялась"
                        },
                        "per_client_usage_limit": {
                          "type": "integer",
                          "example": 1
                        },
                        "usage_percent": {
                          "type": "integer",
                          "example": 5,
                          "description": "процент использования от `total_usage_limit` (0–100)"
                        },
                        "audience": {
                          "type": "string",
                          "example": "new",
                          "description": "кому доступна скидка: `\"all\"` | `\"new\"` | `\"returning\"`"
                        },
                        "starts_at": {
                          "type": "string",
                          "example": "2026-01-01T00:00:00.000000Z",
                          "format": "date-time"
                        },
                        "ends_at": {
                          "type": "string",
                          "example": "2026-12-31T23:59:59.000000Z",
                          "format": "date-time"
                        },
                        "url": {
                          "example": null
                        },
                        "paused_at": {
                          "example": null,
                          "description": "время постановки на паузу (или `null`)"
                        },
                        "archived_at": {
                          "example": null,
                          "description": "время архивирования (или `null`)"
                        },
                        "share_path": {
                          "type": "string",
                          "example": "/share/discount/FIRST10",
                          "description": "путь для шаринга промокода в E-Commerce приложении"
                        },
                        "magic_link": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/d/FIRST10",
                          "format": "uri",
                          "description": "прямая ссылка для активации скидки"
                        },
                        "created_by": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Артём"
                            }
                          }
                        },
                        "updated_by": {
                          "example": null
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-01-01T00:00:00.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-01-01T00:00:00.000000Z",
                          "format": "date-time"
                        },
                        "latest_usages": {
                          "type": "array",
                          "items": {},
                          "description": "последние применения скидки (массив объектов)"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-get"
        }
      },
      "put": {
        "summary": "Обновление скидки",
        "operationId": "discount-update",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/discounts. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "название скидки"
                  },
                  "application_id": {
                    "type": "integer",
                    "description": "ID приложения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "discount_type": {
                    "type": "string",
                    "description": "тип: `\"percent\"` | `\"fixed\"`"
                  },
                  "discount_value": {
                    "type": "string",
                    "description": "значение скидки, decimal-string"
                  },
                  "code": {
                    "type": "string",
                    "description": "промокод"
                  },
                  "description": {
                    "type": "string",
                    "description": "описание"
                  },
                  "min_order_amount": {
                    "type": "string",
                    "description": "минимальная сумма заказа для применения"
                  },
                  "max_discount_amount": {
                    "type": "string",
                    "description": "максимальная сумма скидки"
                  },
                  "total_usage_limit": {
                    "type": "integer",
                    "description": "лимит использований всего"
                  },
                  "per_client_usage_limit": {
                    "type": "integer",
                    "description": "лимит использований на одного клиента"
                  },
                  "audience": {
                    "type": "string",
                    "description": "аудитория: `\"all\"` | `\"new\"` | `\"returning\"`"
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date",
                    "description": "дата начала ISO 8601"
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date",
                    "description": "дата окончания ISO 8601"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление скидки",
        "operationId": "discount-delete",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-delete"
        }
      }
    },
    "/api/discounts/stats": {
      "get": {
        "summary": "Статистика скидок",
        "operationId": "discounts-stats",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discounts-stats"
        }
      }
    },
    "/api/discounts/{id}/pause": {
      "post": {
        "summary": "Поставить скидку на паузу",
        "operationId": "discount-pause",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-pause"
        },
        "description": "Временно останавливает скидку. `effective_status` становится `\"paused\"`, поле `paused_at` заполняется."
      }
    },
    "/api/discounts/{id}/activate": {
      "post": {
        "summary": "Активировать скидку",
        "operationId": "discount-activate",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-activate"
        },
        "description": "Снимает паузу и возобновляет скидку. `paused_at` сбрасывается в `null`."
      }
    },
    "/api/discounts/{id}/archive": {
      "post": {
        "summary": "Архивировать скидку",
        "operationId": "discount-archive",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-archive"
        },
        "description": "Переводит скидку в архив. `archived_at` заполняется текущим временем."
      }
    },
    "/api/discounts/{id}/usages": {
      "get": {
        "summary": "Использования скидки",
        "operationId": "discount-usages",
        "tags": [
          "Платформа / Акции и скидки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Промоакции/#discount-usages"
        }
      }
    },
    "/api/tables/shops": {
      "get": {
        "summary": "Получение списка магазинов (табличное представление)",
        "operationId": "shops-table",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "city_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID города из справочника Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/cities"
                ]
              }
            }
          },
          {
            "name": "branch_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID бизнеса из справочника Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/branches"
                ]
              }
            }
          },
          {
            "name": "is_shop",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 124,
                            "description": "первичный ключ"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 16
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        },
                        "description": "объект, содержащий информацию для генерации таблиц"
                      },
                      "description": "объект, содержащий информацию для генерации таблиц"
                    },
                    "shops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 17,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Сей Момент"
                              }
                            },
                            "description": "объект с информацией о названии магазина"
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "ИП Дерюгин Дмитрий Александрович"
                              }
                            },
                            "description": "объект с информацией о бизнесе (первый из массива)"
                          },
                          "city": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Москва",
                                "description": "объект с информацией о названии магазина"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-04-19T09:18:41.000000Z",
                                "format": "date-time"
                              }
                            },
                            "description": "город, в котором расположен магазин"
                          },
                          "address": {
                            "type": "string",
                            "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                            "description": "полный адрес магазина"
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "объект, содержащий информацию о пользователе, который добавил запись в БД"
                          },
                          "schedule": {
                            "type": "string",
                            "example": "Ежедневно, с 10:00 до 18:00",
                            "description": "график работы магазина"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 4,
                          "description": "общее кол-во записей"
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10,
                          "description": "кол-во элементов на странице"
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1,
                          "description": "номер первого элемента на выбранной странице"
                        },
                        "to": {
                          "type": "integer",
                          "example": 4,
                          "description": "номер крайнего элемента на выбранной странице"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shops-table"
        }
      }
    },
    "/api/shops": {
      "get": {
        "summary": "Получение списка магазинов",
        "operationId": "shops-list",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "city_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID города из справочника Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/cities"
                ]
              }
            }
          },
          {
            "name": "branch_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID бизнеса из справочника Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/branches"
                ]
              }
            }
          },
          {
            "name": "is_shop",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 3,
                            "description": "первичный ключ"
                          },
                          "is_shop": {
                            "type": "boolean",
                            "example": true,
                            "description": "флаг: магазин (`true`) или пункт выдачи (`false`)"
                          },
                          "avatar": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Container.svg",
                                "description": "название магазина"
                              },
                              "path": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/J89936UEJYHmqaWyN8TA2JfTfFHWGvt2jequMsyd.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-04-18T13:37:45.000000Z",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2024-04-18T13:37:45.000000Z",
                                "format": "date-time"
                              }
                            },
                            "description": "объект с информацией о фотографии магазина"
                          },
                          "code": {
                            "type": "string",
                            "example": "01",
                            "description": "уникальный код магазина"
                          },
                          "name": {
                            "type": "string",
                            "example": "Столичный",
                            "description": "название магазина"
                          },
                          "branches": {
                            "type": "array",
                            "items": {},
                            "description": "массив объектов привязанных бизнесов"
                          },
                          "warehouses": {
                            "type": "array",
                            "items": {},
                            "description": "массив объектов привязанных складов"
                          },
                          "address": {
                            "type": "string",
                            "example": "г. Москва, ул. Красная Площадь, 1",
                            "description": "полный адрес магазина"
                          },
                          "latitude": {
                            "example": null,
                            "description": "широта (опционально)"
                          },
                          "longitude": {
                            "example": null,
                            "description": "долгота (опционально)"
                          },
                          "phone": {
                            "type": "string",
                            "example": "79990000000",
                            "description": "телефон"
                          }
                        }
                      }
                    },
                    "shopsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shops-list"
        }
      },
      "post": {
        "summary": "Добавление магазина",
        "operationId": "shop-create",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shop": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4
                        },
                        "is_shop": {
                          "type": "boolean",
                          "example": true
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "code": {
                          "type": "string",
                          "example": "10"
                        },
                        "name": {
                          "type": "string",
                          "example": "Сей Момент"
                        },
                        "branches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 15
                              },
                              "code": {
                                "type": "string",
                                "example": "1"
                              },
                              "name": {
                                "type": "string",
                                "example": "ИП Дерюгин Дмитрий Александрович"
                              },
                              "photo": {
                                "example": null
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": false
                              },
                              "address": {
                                "type": "string",
                                "example": "283045, Донецкая Народная респ, г Донецк, ул Профессоров Богославских, д 5а"
                              },
                              "storage_capacity": {
                                "example": null
                              },
                              "storage_unit": {
                                "example": null
                              },
                              "city": {
                                "example": null
                              },
                              "counterparty": {
                                "example": null
                              }
                            }
                          }
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "code": {
                                "example": null
                              },
                              "name": {
                                "type": "string",
                                "example": "Петухова"
                              },
                              "photo": {
                                "example": null
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": true
                              },
                              "address": {
                                "type": "string",
                                "example": "Петухова 155/1 к4"
                              },
                              "storage_capacity": {
                                "type": "integer",
                                "example": 100000
                              },
                              "storage_unit": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Кубический метр"
                                  },
                                  "abbreviation": {
                                    "type": "string",
                                    "example": "м³"
                                  }
                                }
                              },
                              "city": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Новосибирск"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                    "format": "uri"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "example": "2024-04-19T09:18:41.000000Z",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "counterparty": {
                                "example": null
                              }
                            }
                          }
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79990000000"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла после его загрузки на сервер"
                  },
                  "is_shop": {
                    "type": "boolean",
                    "example": true
                  },
                  "code": {
                    "type": "string",
                    "example": "10",
                    "description": "уникальный код магазина"
                  },
                  "name": {
                    "type": "string",
                    "example": "Сей Момент",
                    "description": "название магазина"
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                    "description": "адрес магазина, полученный из Dadata"
                  },
                  "branches": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 15
                    }
                  },
                  "warehouses": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "номер телефона"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}": {
      "put": {
        "summary": "Обновление выбранного магазина",
        "operationId": "shop-update",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла после его загрузки на сервер"
                  },
                  "is_shop": {
                    "type": "boolean",
                    "example": true
                  },
                  "code": {
                    "type": "string",
                    "example": "10",
                    "description": "уникальный код магазина"
                  },
                  "name": {
                    "type": "string",
                    "example": "Сей Момент",
                    "description": "название магазина"
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                    "description": "адрес магазина, полученный из Dadata"
                  },
                  "branches": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 15
                    }
                  },
                  "warehouses": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "79990000000",
                    "description": "номер телефона"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получение выбранного магазина",
        "operationId": "shop-show",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shop": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "is_shop": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg",
                              "description": "название магазина"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название магазина"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "объект с информацией о загруженном файле"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о загруженном файле"
                        },
                        "code": {
                          "type": "string",
                          "example": "10",
                          "description": "уникальный код магазина"
                        },
                        "name": {
                          "type": "string",
                          "example": "Сей Момент",
                          "description": "название магазина"
                        },
                        "branches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 15,
                                "description": "первичный ключ"
                              },
                              "code": {
                                "type": "string",
                                "example": "1",
                                "description": "уникальный код магазина"
                              },
                              "name": {
                                "type": "string",
                                "example": "ИП Дерюгин Дмитрий Александрович",
                                "description": "название магазина"
                              },
                              "photo": {
                                "example": null
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": false
                              },
                              "address": {
                                "type": "string",
                                "example": "283045, Донецкая Народная респ, г Донецк, ул Профессоров Богославских, д 5а",
                                "description": "адрес магазина"
                              },
                              "storage_capacity": {
                                "example": null
                              },
                              "storage_unit": {
                                "example": null
                              },
                              "city": {
                                "example": null
                              },
                              "counterparty": {
                                "example": null
                              }
                            },
                            "description": "массив объектов с информацией о бизнесе"
                          },
                          "description": "массив объектов с информацией о бизнесе"
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "code": {
                                "example": null,
                                "description": "уникальный код магазина"
                              },
                              "name": {
                                "type": "string",
                                "example": "Петухова",
                                "description": "название магазина"
                              },
                              "photo": {
                                "example": null
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": true
                              },
                              "address": {
                                "type": "string",
                                "example": "Петухова 155/1 к4",
                                "description": "адрес магазина"
                              },
                              "storage_capacity": {
                                "type": "integer",
                                "example": 100000
                              },
                              "storage_unit": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Кубический метр",
                                    "description": "название магазина"
                                  },
                                  "abbreviation": {
                                    "type": "string",
                                    "example": "м³"
                                  }
                                }
                              },
                              "city": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Новосибирск",
                                    "description": "название магазина"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                    "format": "uri",
                                    "description": "объект с информацией о загруженном файле"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "example": "2024-04-19T09:18:41.000000Z",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "counterparty": {
                                "example": null
                              }
                            },
                            "description": "массив объектов с информацией о складе"
                          },
                          "description": "массив объектов с информацией о складе"
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                          "description": "адрес магазина"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79990000000",
                          "description": "номер телефона магазина"
                        },
                        "schedule": {
                          "type": "string",
                          "example": "Ежедневно, с 10:00 до 18:00",
                          "description": "график работы"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-show"
        }
      },
      "delete": {
        "summary": "Удаление выбранного магазина",
        "operationId": "shop-delete",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Shop successfully deleted."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-delete"
        }
      }
    },
    "/api/shops/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по выбранному магазину",
        "operationId": "shop-history",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "histories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 170,
                            "description": "первичный ключ"
                          },
                          "icon": {
                            "type": "string",
                            "example": "done",
                            "description": "иконка"
                          },
                          "color": {
                            "type": "string",
                            "example": "success",
                            "description": "цвет"
                          },
                          "title": {
                            "type": "string",
                            "example": "Редактирование",
                            "description": "заголовок"
                          },
                          "description": {
                            "type": "string",
                            "example": "Редактирование: Полищук Артём",
                            "description": "описание"
                          },
                          "datetime": {
                            "type": "string",
                            "example": "28.06.2024 06:09",
                            "description": "дата выполнения действия"
                          }
                        }
                      }
                    },
                    "historiesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-history"
        }
      }
    },
    "/api/shops/{id}/hours": {
      "get": {
        "summary": "Получение списка дней и часов работы выбранного магазина",
        "operationId": "shop-hours-list",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hours": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "day_of_week": {
                            "type": "string",
                            "example": "ПН",
                            "description": "день недели"
                          },
                          "is_working_day": {
                            "type": "boolean",
                            "example": true,
                            "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                          },
                          "work_start_time": {
                            "type": "string",
                            "example": "09:00:00",
                            "description": "время начала рабочего дня"
                          },
                          "work_end_time": {
                            "type": "string",
                            "example": "18:00:00",
                            "description": "время завершения рабочего дня"
                          },
                          "break_start_time": {
                            "example": null,
                            "description": "время начала перерыва"
                          },
                          "break_end_time": {
                            "example": null,
                            "description": "время окончания перерыва"
                          }
                        }
                      }
                    },
                    "hoursCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-hours-list"
        }
      },
      "post": {
        "summary": "Добавление дней и часов работы выбранного магазина",
        "operationId": "shop-hours-create",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hour": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "day_of_week": {
                          "type": "string",
                          "example": "ПН",
                          "description": "день недели"
                        },
                        "is_working_day": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                        },
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "example": "13:00",
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "type": "string",
                          "example": "14:00",
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-hours-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day_of_week": {
                    "type": "string",
                    "example": "ПН",
                    "description": "день недели. Доступные значения: ПН, ВТ, СР, ЧТ, ПТ, СБ, ВС"
                  },
                  "is_working_day": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                  },
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "type": "string",
                    "example": "13:00",
                    "description": "время начала перерыва"
                  },
                  "break_end_time": {
                    "type": "string",
                    "example": "14:00",
                    "description": "время окончания перерыва"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{shop_id}/hours/{id}": {
      "put": {
        "summary": "Обновление дней и часов работы выбранного магазина",
        "operationId": "shop-hours-update",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "shop_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hour": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "day_of_week": {
                          "type": "string",
                          "example": "ПН",
                          "description": "день недели"
                        },
                        "is_working_day": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                        },
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "example": null,
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "example": null,
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-hours-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day_of_week": {
                    "type": "string",
                    "example": "ПН",
                    "description": "день недели. Доступные значения: ПН, ВТ, СР, ЧТ, ПТ, СБ, ВС"
                  },
                  "is_working_day": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                  },
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "example": null,
                    "description": "время начала перерыва"
                  },
                  "break_end_time": {
                    "example": null,
                    "description": "время окончания перерыва"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранных дней и часов работы магазина",
        "operationId": "shop-hours-delete",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "shop_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Shop hour deleted successfully."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-hours-delete"
        }
      }
    },
    "/api/shops/{id}/holidays": {
      "get": {
        "summary": "Получение графика работы в праздничные дни выбранного магазина",
        "operationId": "shop-holidays-list",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "holidays": {
                      "type": "object",
                      "properties": {
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "example": null,
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "example": null,
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-holidays-list"
        }
      },
      "post": {
        "summary": "Обновление графика работы в праздничные дни выбранного магазина",
        "operationId": "shop-holidays-update",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "holidays": {
                      "type": "object",
                      "properties": {
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "example": "12:00",
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "type": "string",
                          "example": "13:00",
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-holidays-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "type": "string",
                    "example": "12:00",
                    "description": "время начала перерыва"
                  },
                  "break_end_time": {
                    "type": "string",
                    "example": "13:00",
                    "description": "время окончания перерыва"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}/exceptions": {
      "get": {
        "summary": "Получение списка дней-исключений в работе выбранного магазина",
        "operationId": "shop-exceptions-list",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "exception_start_date": {
                            "type": "string",
                            "example": "2024-08-10",
                            "format": "date",
                            "description": "дата начала периода выходных дней"
                          },
                          "exception_end_date": {
                            "type": "string",
                            "example": "2024-08-12",
                            "format": "date",
                            "description": "дата окончания периода выходных дней"
                          }
                        }
                      }
                    },
                    "exceptionsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-exceptions-list"
        }
      },
      "post": {
        "summary": "Добавление промежутка дней-исключений для выбранного магазина",
        "operationId": "shop-exception-create",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "exception_start_date": {
                          "type": "string",
                          "example": "2024-08-10",
                          "format": "date",
                          "description": "дата начала периода выходных дней"
                        },
                        "exception_end_date": {
                          "type": "string",
                          "example": "2024-08-12",
                          "format": "date",
                          "description": "дата окончания периода выходных дней"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-exception-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exception_start_date": {
                    "type": "string",
                    "example": "2024-08-10",
                    "format": "date",
                    "description": "дата начала периода выходных дней"
                  },
                  "exception_end_date": {
                    "type": "string",
                    "example": "2024-08-12",
                    "format": "date",
                    "description": "дата окончания периода выходных дней"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{shop_id}/exceptions/{id}": {
      "put": {
        "summary": "Обновление промежутка дней-исключений для выбранного магазина",
        "operationId": "shop-exception-update",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "shop_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "exception_start_date": {
                          "type": "string",
                          "example": "2024-08-10",
                          "format": "date",
                          "description": "дата начала периода выходных дней"
                        },
                        "exception_end_date": {
                          "type": "string",
                          "example": "2024-08-12",
                          "format": "date",
                          "description": "дата окончания периода выходных дней"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-exception-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exception_start_date": {
                    "type": "string",
                    "example": "2024-08-10",
                    "format": "date",
                    "description": "дата начала периода выходных дней"
                  },
                  "exception_end_date": {
                    "type": "string",
                    "example": "2024-08-12",
                    "format": "date",
                    "description": "дата окончания периода выходных дней"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление промежутка дней-исключения для выбранного магазина",
        "operationId": "shop-exception-delete",
        "tags": [
          "Платформа / Магазины и пункты выдачи"
        ],
        "parameters": [
          {
            "name": "shop_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Shop exception deleted successfully."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Магазины/#shop-exception-delete"
        }
      }
    },
    "/api/counterparties": {
      "get": {
        "summary": "Список контрагентов",
        "operationId": "counterparties-list",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "is_company",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "фильтр компании/физлица (boolean)"
            }
          },
          {
            "name": "counterparty_type_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID типов контрагентов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/counterparty_types"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "manager_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID менеджеров Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/managers"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "диапазон по дате добавления"
            }
          },
          {
            "name": "credit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "задолженность равна (int)"
            }
          },
          {
            "name": "credit_gt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "задолженность больше"
            }
          },
          {
            "name": "credit_lt",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "задолженность меньше"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "is_company": {
                            "type": "boolean",
                            "example": true,
                            "description": "`true` для компании, `false` для физлица"
                          },
                          "type": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Юр. лицо"
                              },
                              "avatar": {
                                "example": null,
                                "description": "объект файла аватара (`id`, `url`, …) или `null`"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-03-22T14:01:37.000000Z",
                                "format": "date-time"
                              }
                            },
                            "description": "объект типа контрагента (`id`, `name`, `avatar`, `created_at`) или `null`"
                          },
                          "manager": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Артём"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Полищук"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Николаевич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "объект менеджера (`id`, `first_name`, `last_name`, `middle_name`, `name`) или `null`"
                          },
                          "avatar": {
                            "example": null,
                            "description": "объект файла аватара (`id`, `url`, …) или `null`"
                          },
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\""
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич"
                          },
                          "registered_at": {
                            "type": "string",
                            "example": "2020-04-02",
                            "format": "date"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "email": {
                            "type": "string",
                            "example": "user@example.test"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-22T14:01:37.000000Z",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2024-04-03T07:07:11.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparties-list"
        }
      },
      "post": {
        "summary": "Создание контрагента",
        "operationId": "counterparty-create",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "is_company": {
                          "type": "boolean",
                          "example": false
                        },
                        "...": {
                          "type": "string",
                          "example": "поля как в GET"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparty-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_company": {
                    "type": "boolean",
                    "example": false,
                    "description": "`true`"
                  },
                  "counterparty_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID типа Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/counterparty_types"
                      ]
                    }
                  },
                  "first_name": {
                    "type": "string",
                    "example": "Алексей",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Петров"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Викторович"
                  },
                  "birthday": {
                    "type": "string",
                    "example": "1980-04-02",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/counterparties": {
      "get": {
        "summary": "Таблица контрагентов (для UI с колонками и пагинацией)",
        "operationId": "counterparties-table",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "служебные"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 3
                          },
                          "order": {
                            "type": "integer",
                            "example": 1
                          },
                          "key": {
                            "type": "string",
                            "example": "name",
                            "description": "ключ поля контрагента"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 1,
                            "description": "`1` если рядом со значением показывается иконка"
                          },
                          "text": {
                            "type": "string",
                            "example": "Название",
                            "description": "заголовок колонки"
                          }
                        }
                      }
                    },
                    "counterparties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "служебные"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-22T14:01:37.000000Z",
                            "format": "date-time"
                          },
                          "type": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "/icons/company.svg"
                              },
                              "value": {
                                "type": "string",
                                "example": "Юр. лицо"
                              }
                            }
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "string",
                                "example": "ООО \"АЙТЕКО\""
                              }
                            }
                          },
                          "manager": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            }
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          },
                          "contact": {
                            "example": null
                          },
                          "credit": {
                            "type": "integer",
                            "example": 0
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 42
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 15
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 3
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 15
                        }
                      },
                      "description": "стандартный Laravel-пагинатор: `total`, `per_page`, `current_page`, `last_page`, `from`, `to`"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparties-table"
        },
        "description": "Возвращает данные в формате, пригодном для отрисовки таблицы: список колонок, упрощённое представление контрагентов и пагинацию. Поддерживает те же query-фильтры, что и `/api/counterparties`."
      }
    },
    "/api/counterparties/{id}": {
      "get": {
        "summary": "Получение контрагента по ID",
        "operationId": "counterparty-get",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "is_company": {
                          "type": "boolean",
                          "example": false
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница"
                            },
                            "avatar": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-22T14:01:37.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "avatar": {
                          "example": null
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Викторович"
                        },
                        "birthday": {
                          "type": "string",
                          "example": "1980-04-02",
                          "format": "date"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "phone_2": {
                          "type": "string",
                          "example": "79990000000"
                        },
                        "email": {
                          "type": "string",
                          "example": "user@example.test"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-22T14:01:37.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-04-03T07:07:11.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparty-get"
        }
      },
      "put": {
        "summary": "Изменение контрагента",
        "operationId": "counterparty-update",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "...": {
                          "type": "string",
                          "example": "обновлённый объект"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparty-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/counterparties. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_company": {
                    "type": "boolean",
                    "example": false,
                    "description": "`true`"
                  },
                  "counterparty_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID типа Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/counterparty_types"
                      ]
                    }
                  },
                  "first_name": {
                    "type": "string",
                    "example": "Алексей",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Петров"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Викторович"
                  },
                  "birthday": {
                    "type": "string",
                    "example": "1980-04-02",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление контрагента",
        "operationId": "counterparty-delete",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Counterparty deleted"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparty-delete"
        }
      }
    },
    "/api/counterparties/{id}/bank_requisites": {
      "get": {
        "summary": "Список банковских реквизитов контрагента",
        "operationId": "bank-requisites-list",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "название счёта/банка"
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641",
                            "description": "БИК"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001",
                            "description": "КПП"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101",
                            "description": "номер расчётного счёта"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, Новосибирская область, г. Новосибирск, Красный проспект, д. 5",
                            "description": "адрес банка"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-22T14:01:37.000000Z",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2024-04-03T07:07:11.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#bank-requisites-list"
        }
      },
      "post": {
        "summary": "Добавление банковского реквизита",
        "operationId": "bank-requisite-create",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, г. Новосибирск, Красный проспект, д. 5"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#bank-requisite-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/bank_requisites/{requisiteId}": {
      "put": {
        "summary": "Изменение банковского реквизита",
        "operationId": "bank-requisite-update",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "requisiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#bank-requisite-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/counterparties/{id}/bank_requisites. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/contacts": {
      "get": {
        "summary": "Список контактов контрагента",
        "operationId": "contacts-list",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "first_name": {
                            "type": "string",
                            "example": "Анна"
                          },
                          "last_name": {
                            "type": "string",
                            "example": "Иванова"
                          },
                          "middle_name": {
                            "type": "string",
                            "example": "Сергеевна"
                          },
                          "birthday": {
                            "type": "string",
                            "example": "1985-07-15",
                            "format": "date"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": "79990000000"
                          },
                          "email": {
                            "type": "string",
                            "example": "user@example.test"
                          },
                          "address": {
                            "type": "string",
                            "example": "г. Новосибирск, ул. Ленина, 1"
                          }
                        }
                      }
                    },
                    "contactsCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#contacts-list"
        }
      },
      "post": {
        "summary": "Добавление контакта",
        "operationId": "contact-create",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#contact-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Анна",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Иванова"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Сергеевна"
                  },
                  "birthday": {
                    "type": "string",
                    "example": "1985-07-15",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "г. Новосибирск, ул. Ленина, 1"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/contacts/{contactId}": {
      "put": {
        "summary": "Изменение контакта",
        "operationId": "contact-update",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода."
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#contact-update"
        },
        "requestBody": {
          "required": true,
          "description": "Карточка метода описывает тело ссылкой на POST /api/counterparties/{id}/contacts. Схема унаследована оттуда; обязательность полей при обновлении карточкой не зафиксирована.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Анна",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Иванова"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Сергеевна"
                  },
                  "birthday": {
                    "type": "string",
                    "example": "1985-07-15",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "79990000000"
                  },
                  "email": {
                    "type": "string",
                    "example": "user@example.test"
                  },
                  "address": {
                    "type": "string",
                    "example": "г. Новосибирск, ул. Ленина, 1"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/history": {
      "get": {
        "summary": "История изменений контрагента",
        "operationId": "counterparty-history",
        "tags": [
          "Платформа / Клиенты и контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "пагинация"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparties": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 101,
                                "description": "ID события"
                              },
                              "icon": {
                                "type": "string",
                                "example": "edit",
                                "description": "имя иконки (`edit`, `add`, `delete`, …)"
                              },
                              "color": {
                                "type": "string",
                                "example": "info",
                                "description": "`primary | secondary | info | success | warning | error | dark | light`"
                              },
                              "title": {
                                "type": "string",
                                "example": "Изменён телефон",
                                "description": "короткий заголовок события"
                              },
                              "description": {
                                "type": "string",
                                "example": "phone_1: 79999999990 → 79991112233",
                                "description": "описание изменения"
                              },
                              "dateTime": {
                                "type": "string",
                                "example": "2024-04-03T07:07:11.000000Z",
                                "format": "date-time",
                                "description": "ISO-8601"
                              }
                            },
                            "description": "события:"
                          },
                          "description": "события:"
                        },
                        "first_page_url": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/counterparties/1/history?page=1",
                          "format": "uri"
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 2
                        },
                        "last_page_url": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/counterparties/1/history?page=2",
                          "format": "uri"
                        },
                        "next_page_url": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/counterparties/1/history?page=2",
                          "format": "uri"
                        },
                        "path": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/counterparties/1/history",
                          "format": "uri"
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 15
                        },
                        "prev_page_url": {
                          "example": null
                        },
                        "to": {
                          "type": "integer",
                          "example": 15
                        },
                        "total": {
                          "type": "integer",
                          "example": 20
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "example": null
                              },
                              "label": {
                                "type": "string",
                                "example": "&laquo; Previous"
                              },
                              "active": {
                                "type": "boolean",
                                "example": false
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Контрагенты/#counterparty-history"
        },
        "description": "Возвращает события по контрагенту в формате таймлайна с пагинацией."
      }
    },
    "/api/orders": {
      "get": {
        "summary": "Получение списка заказов",
        "operationId": "erp-orders-list",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "hierarchy",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "`all` для всех доступных заказов или `my` только для заказов текущего manager;"
            }
          },
          {
            "name": "counterparty_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "ID контрагента;"
            }
          },
          {
            "name": "department_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "ID отделов менеджеров; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/departments"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "order_status_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "ID статусов заказа; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/order_statuses"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "application_id[]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "ID приложений-источников; Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/applications"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "поиск по объекту, номеру договора, номеру счёта или адресу, минимум 3 символа;"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания от;"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "дата создания по."
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 17
                          },
                          "avatar": {
                            "example": null
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "В сборке"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "price": {
                            "type": "string",
                            "example": "4500.00",
                            "format": "decimal"
                          },
                          "promo_code": {
                            "example": null
                          },
                          "original_price": {
                            "type": "integer",
                            "example": 5000
                          },
                          "product_discount_amount": {
                            "type": "integer",
                            "example": 500
                          },
                          "promo_discount_amount": {
                            "type": "integer",
                            "example": 0
                          },
                          "total_discount_amount": {
                            "type": "integer",
                            "example": 500
                          },
                          "final_price": {
                            "type": "integer",
                            "example": 4500
                          },
                          "invoice_number": {
                            "example": null
                          },
                          "invoice_start_date": {
                            "example": null
                          },
                          "invoice_end_date": {
                            "example": null
                          },
                          "application": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 14
                              },
                              "name": {
                                "type": "string",
                                "example": "Сей момент"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-08-01T09:20:01.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "counterparty": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 56
                              },
                              "name": {
                                "type": "string",
                                "example": "ООО \"РОГА И КОПЫТА\""
                              }
                            },
                            "description": "клиент заказа или `null`, если заказ создан без контрагента;"
                          },
                          "delivery_type": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Самовывоз"
                              },
                              "price": {
                                "type": "string",
                                "example": "0.00",
                                "format": "decimal"
                              },
                              "is_active": {
                                "type": "integer",
                                "example": 1
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-05-13T05:26:37.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "address": {
                            "type": "string",
                            "example": "357100, Ставропольский край, г Невинномысск"
                          },
                          "shop": {
                            "example": null
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 15
                              },
                              "name": {
                                "type": "string",
                                "example": "Торговля косметикой"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-08-01T07:50:59.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "object": {
                            "example": null
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 14
                              },
                              "name": {
                                "type": "string",
                                "example": "Сей момент"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-08-01T09:20:01.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "sales_channel": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Канал продаж 1"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "format": "date-time"
                              }
                            }
                          },
                          "manager": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Артём"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Полищук"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Николаевич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            }
                          },
                          "promotion": {
                            "example": null
                          },
                          "contract": {
                            "example": null
                          },
                          "contract_number": {
                            "example": null
                          },
                          "contract_start_date": {
                            "example": null
                          },
                          "contract_end_date": {
                            "example": null
                          },
                          "name": {
                            "example": null
                          },
                          "refund_request": {
                            "type": "object",
                            "properties": {
                              "requested_at": {
                                "example": null
                              },
                              "requested_by_user_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "example": null
                              },
                              "comment": {
                                "example": null
                              },
                              "email_sent_at": {
                                "example": null
                              }
                            }
                          },
                          "ticket": {
                            "type": "object",
                            "properties": {
                              "redeem_token": {
                                "example": null
                              },
                              "redeemed_count": {
                                "type": "integer",
                                "example": 0
                              },
                              "total_tickets": {
                                "type": "integer",
                                "example": 1
                              },
                              "last_redeemed_at": {
                                "example": null
                              },
                              "last_redeemed_by": {
                                "example": null
                              }
                            },
                            "description": "данные гашения билета с дополнительной проверкой project/branch scope."
                          }
                        },
                        "description": "массив ресурсов заказа; структура элемента совпадает с `GET /api/orders/{id}`;"
                      },
                      "description": "массив ресурсов заказа; структура элемента совпадает с `GET /api/orders/{id}`;"
                    },
                    "ordersCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "количество заказов после применения фильтров;"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#erp-orders-list"
        },
        "description": "\" success=\"200\" >"
      },
      "post": {
        "summary": "Добавление заказа",
        "operationId": "order-create",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 763
                            },
                            "name": {
                              "type": "string",
                              "example": "ai monsters.jpg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/AsQsvs5VPbIo6YkYlnlQel39T7RS01zYD2NPlYYv.jpg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T15:55:09.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-08-01T15:55:09.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "В сборке"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "invoice_number": {
                          "example": null
                        },
                        "invoice_start_date": {
                          "example": null
                        },
                        "invoice_end_date": {
                          "example": null
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T09:20:01.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 56
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"РОГА И КОПЫТА\""
                            }
                          }
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Самовывоз"
                            },
                            "price": {
                              "type": "string",
                              "example": "0.00",
                              "format": "decimal"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-05-13T05:26:37.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "address": {
                          "type": "string",
                          "example": "357100, Ставропольский край, г Невинномысск"
                        },
                        "shop": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "photo": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "logo.svg"
                                },
                                "type": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 1
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Трудовой договор"
                                    },
                                    "avatar": {
                                      "type": "string",
                                      "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                      "format": "uri"
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "example": "2024-03-27T07:00:46.000000Z",
                                      "format": "date-time"
                                    }
                                  }
                                },
                                "path": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-04-14T20:04:32.000000Z",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "example": "2024-04-14T20:04:32.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "name": {
                              "type": "string",
                              "example": "Центральный"
                            },
                            "address": {
                              "type": "string",
                              "example": "г. Ростов-на-Дону, ул. Ленина, 1"
                            },
                            "phone": {
                              "type": "string",
                              "example": "79990000000"
                            },
                            "schedule": {
                              "type": "string",
                              "example": "ПН-ПТ, с 10:00 до 18:00"
                            }
                          }
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15
                            },
                            "name": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T07:50:59.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "object": {
                          "example": null
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T09:20:01.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "sales_channel": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Канал продаж 1"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "promotion": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Улётное лето"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default_brand.png",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-07-28T16:59:24.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "contract": {
                          "example": null
                        },
                        "contract_number": {
                          "example": null
                        },
                        "contract_start_date": {
                          "example": null
                        },
                        "contract_end_date": {
                          "example": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии (`GET /api/files`)"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID контрагента (`GET /api/counterparties`)"
                  },
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа доставки (`GET /api/delivery_types`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/delivery_types",
                        "/api/counterparty/delivery_types"
                      ]
                    }
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, пл Комсомольская, д 20",
                    "description": "адрес заказа (min:3)"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID бизнеса (`GET /api/branches`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "shop_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID магазина (`GET /api/shops`). Рекомендуется с `branch_id`"
                  },
                  "object_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "ID объекта Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/objects"
                      ]
                    }
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID источника (E-Commerce application) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "sales_channel_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID канала продаж Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/sales_channels"
                      ]
                    }
                  },
                  "manager_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID менеджера (`GET /api/managers`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/managers"
                      ]
                    }
                  },
                  "promotion_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "ID промоакции"
                  },
                  "contract_number": {
                    "type": "string",
                    "example": "А-35/2024",
                    "description": "номер договора"
                  },
                  "contract_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла договора (`GET /api/files`)"
                  },
                  "contract_start_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "contract_end_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "123123",
                    "description": "номер счёта"
                  },
                  "invoice_start_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  },
                  "invoice_end_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "`YYYY-MM-DD`"
                  }
                },
                "required": [
                  "counterparty_id",
                  "manager_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tables/orders": {
      "get": {
        "summary": "Получение списка заказов (табличное представление)",
        "operationId": "orders-table",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "order_status_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID статусов заказа из справочника Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/order_statuses"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "application_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID источников заказа Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/applications"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "department_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID отделов Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/departments"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "hierarchy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "`all` для получения всех заказов, `my` — только своих"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "текущая страница (для пагинации)"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "кол-во элементов на странице"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "\"дата с...\" (от даты добавления в систему)"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "\"дата по...\" (от даты добавления в систему)"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 26,
                            "description": "первичный ключ (номер заказа)"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 4
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        },
                        "description": "массив столбцов"
                      },
                      "description": "массив столбцов"
                    },
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 16,
                            "description": "первичный ключ (номер заказа)"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "27.07.2024 12:43",
                            "description": "дата/время создания заказа"
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/9qzh2GCaYpRpaxXnql0JZYpIesu3qlvQLV2OBhcN.png",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Продажа косметики"
                              }
                            },
                            "description": "объект с информацией о бизнесе"
                          },
                          "counterparty": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": " "
                              }
                            },
                            "description": "объект с информацией о клиенте (контрагенте)"
                          },
                          "object": {
                            "example": null,
                            "description": "объект с информацией об объекте"
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/uPINajA2l2XPB44ojjTEd88wRKxRwsWXIlrgg2iX.jpg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Сей момент"
                              }
                            },
                            "description": "объект с информацией об источнике заказа"
                          },
                          "manager": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "объект с информацией о менеджере"
                          },
                          "sales_channel": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/uPINajA2l2XPB44ojjTEd88wRKxRwsWXIlrgg2iX.jpg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Сей момент"
                              }
                            },
                            "description": "объект с информацией о канале продаж"
                          },
                          "promotion": {
                            "example": null,
                            "description": "объект с информацией о промоакции"
                          },
                          "price": {
                            "example": null,
                            "description": "стоимость заказа"
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "В сборке"
                              }
                            },
                            "description": "объект с информацией о статусе заказа"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "объект с информацией, необходимой для пагинации"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#orders-table"
        }
      }
    },
    "/api/orders/{id}": {
      "get": {
        "summary": "Получение выбранного заказа",
        "operationId": "order-show",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17,
                          "description": "первичный ключ (номер заказа)"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 763,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "ai monsters.jpg",
                              "description": "произвольное название заказа"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "первичный ключ (номер заказа)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар",
                                  "description": "произвольное название заказа"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "объект с информацией о фотографии заказа"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/AsQsvs5VPbIo6YkYlnlQel39T7RS01zYD2NPlYYv.jpg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T15:55:09.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-08-01T15:55:09.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о фотографии заказа"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "В сборке",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о статусе заказа"
                        },
                        "invoice_number": {
                          "example": null,
                          "description": "номер счёта"
                        },
                        "invoice_start_date": {
                          "example": null,
                          "description": "дата счёта (дата создания счёта)"
                        },
                        "invoice_end_date": {
                          "example": null,
                          "description": "дата окончания срока действия счёта"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T09:20:01.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о приложении"
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 56,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"РОГА И КОПЫТА\"",
                              "description": "произвольное название заказа"
                            }
                          },
                          "description": "объект с информацией о контрагенте"
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Самовывоз",
                              "description": "произвольное название заказа"
                            },
                            "price": {
                              "type": "string",
                              "example": "0.00",
                              "format": "decimal",
                              "description": "итоговая цена заказа"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-05-13T05:26:37.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о способе доставки заказа"
                        },
                        "address": {
                          "type": "string",
                          "example": "357100, Ставропольский край, г Невинномысск",
                          "description": "адрес"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Торговля косметикой",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T07:50:59.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о бизнесе"
                        },
                        "object": {
                          "example": null,
                          "description": "информация об объекте"
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-01T09:20:01.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией об источнике заказа"
                        },
                        "sales_channel": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Канал продаж 1",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о канале продаж"
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "произвольное название заказа"
                            }
                          },
                          "description": "объект с информацией о менеджере"
                        },
                        "promotion": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Улётное лето",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default_brand.png",
                              "format": "uri",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-07-28T16:59:24.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о промоакции"
                        },
                        "contract": {
                          "example": null,
                          "description": "объект с информацией о договоре"
                        },
                        "contract_number": {
                          "example": null,
                          "description": "номер договора"
                        },
                        "contract_start_date": {
                          "example": null,
                          "description": "дата начала договора"
                        },
                        "contract_end_date": {
                          "example": null,
                          "description": "дата окончания договора"
                        },
                        "name": {
                          "example": null,
                          "description": "произвольное название заказа"
                        },
                        "promo_code": {
                          "example": null,
                          "description": "применённый промокод"
                        },
                        "original_price": {
                          "example": null,
                          "description": "исходная цена до скидок"
                        },
                        "product_discount_amount": {
                          "example": null,
                          "description": "скидка по товарам"
                        },
                        "promo_discount_amount": {
                          "example": null,
                          "description": "скидка по промокоду"
                        },
                        "total_discount_amount": {
                          "example": null,
                          "description": "суммарная скидка"
                        },
                        "final_price": {
                          "example": null,
                          "description": "итоговая цена после всех скидок"
                        },
                        "refund_request": {
                          "type": "object",
                          "properties": {
                            "requested_at": {
                              "example": null
                            },
                            "requested_by_user_id": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "example": null
                            },
                            "comment": {
                              "example": null
                            },
                            "email_sent_at": {
                              "example": null
                            }
                          },
                          "description": "объект с информацией о запросе возврата: `requested_at`, `requested_by_user_id`, `comment`, `email_sent_at`"
                        },
                        "ticket": {
                          "type": "object",
                          "properties": {
                            "redeem_token": {
                              "example": null
                            },
                            "redeemed_count": {
                              "example": null
                            },
                            "total_tickets": {
                              "example": null
                            },
                            "last_redeemed_at": {
                              "example": null
                            },
                            "last_redeemed_by": {
                              "example": null
                            }
                          },
                          "description": "поля гашения билета (только для авторизованных с доступом к заказу): `redeem_token`, `redeemed_count`, `total_tickets`, `last_redeemed_at`, `last_redeemed_by`"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-show"
        }
      },
      "put": {
        "summary": "Редактирование заказа",
        "operationId": "order-update",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии склада"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID контрагента"
                  },
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа доставки Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/delivery_types",
                        "/api/counterparty/delivery_types"
                      ]
                    }
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, пл Комсомольская, д 20",
                    "description": "адрес заказа"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID бизнеса Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  },
                  "object_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "ID объекта Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/objects"
                      ]
                    }
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID источника Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "sales_channel_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID канала продаж Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/sales_channels"
                      ]
                    }
                  },
                  "manager_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID менеджера Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/managers"
                      ]
                    }
                  },
                  "promotion_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "example": null,
                    "description": "ID промоакции"
                  },
                  "contract_number": {
                    "type": "string",
                    "example": "А-35/2024",
                    "description": "номер договора"
                  },
                  "contract_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID договора"
                  },
                  "contract_start_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "дата начала действия договора"
                  },
                  "contract_end_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "дата окончания действия договора"
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "123123",
                    "description": "номер счёта"
                  },
                  "invoice_start_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "дата счёта (дата создания счёта)"
                  },
                  "invoice_end_date": {
                    "type": "string",
                    "example": "2024-01-11",
                    "format": "date",
                    "description": "дата окончания срока действия счёта"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление заказа ⚠ backend bug",
        "operationId": "order-delete",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Order deleted.",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-delete"
        },
        "description": "⚠ **Backend bug:** endpoint стабильно возвращает `500`. Удаление заказа через API сейчас не работает — используй смену статуса в `IS_CANCELED` (6) через `PUT /api/orders/{id}` с `{ \"order_status_id\": 6 }`."
      }
    },
    "/api/tables/orders/{id}/nomenclatures": {
      "get": {
        "summary": "Получение содержимого заказа (табличное представление)",
        "operationId": "order-nomenclatures-table",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 108,
                            "description": "первичный ключ"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 14
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "code"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "Код"
                          }
                        },
                        "description": "массив столбцов"
                      },
                      "description": "массив столбцов"
                    },
                    "orderNomenclatures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 19,
                            "description": "первичный ключ"
                          },
                          "code": {
                            "type": "string",
                            "example": "1234"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Tony Moly Soft Touch Air Puff 5P"
                              }
                            },
                            "description": "объект с номенклатурным наименованием товара"
                          },
                          "warehouse": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Петухова"
                              }
                            },
                            "description": "объект с наименованием склада"
                          },
                          "city": {
                            "type": "string",
                            "example": "Новосибирск",
                            "description": "город"
                          },
                          "brand": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default_brand.png",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Tony Moly"
                              }
                            },
                            "description": "объект с информацией о производителе"
                          },
                          "vat": {
                            "type": "string",
                            "example": "20.00",
                            "format": "decimal",
                            "description": "НДС"
                          },
                          "unit": {
                            "type": "string",
                            "example": "ед",
                            "description": "единицы измерения товара"
                          },
                          "quantity": {
                            "type": "integer",
                            "example": 5,
                            "description": "кол-во товара"
                          },
                          "price": {
                            "type": "string",
                            "example": "900.00",
                            "format": "decimal",
                            "description": "стоимость за 1 единицу"
                          },
                          "amount": {
                            "type": "string",
                            "example": "4500.00",
                            "format": "decimal",
                            "description": "общая стоимость"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 2
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 2
                        }
                      },
                      "description": "объект с информацией, необходимой для пагинации"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-nomenclatures-table"
        }
      }
    },
    "/api/orders/{id}/nomenclatures": {
      "post": {
        "summary": "Добавление товаров в заказ (= создание Reservation) ⚠ backend bug",
        "operationId": "order-nomenclature-create",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 23,
                      "description": "ID (первичный ключ) товарной позиции в заказе"
                    },
                    "orderNomenclature": {
                      "type": "object",
                      "properties": {
                        "warehouseNomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/kcdDZKHha8HbujO4z80uYmOsayHHxTXZrM2q6GEN.webp",
                              "format": "uri"
                            },
                            "name": {
                              "type": "string",
                              "example": "BANILA CO Glow Fit Foundation Brush / Склад Петухова / 5 ед / 204500.00 руб"
                            }
                          },
                          "description": "объект с информацией о товаре, хранимом на складе"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "description": "кол-во товара"
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-06-24T09:57:10.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "price": {
                          "type": "string",
                          "example": "1.00",
                          "format": "decimal",
                          "description": "цена товара"
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Без НДС"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-12T08:51:40.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "НДС"
                        },
                        "amount": {
                          "type": "string",
                          "example": "1.00",
                          "format": "decimal",
                          "description": "общая стоимость товарной позиции"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-nomenclature-create"
        },
        "description": "⚠ **Backend bug:** endpoint часто возвращает `500` на корректных входных данных. Bypass: дождаться фикса бэка либо использовать E-Commerce flow (`POST /api/counterparty/orders`), который создаёт резервации внутри транзакции. **NB:** под капотом этот endpoint создаёт запись `Reservation` (см. erp-rules §18.7). `{id}` в `PUT`/`DELETE …/nomenclatures/{id}` — это id записи `Reservation`, не `nomenclature_id`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID номенклатуры из `GET /api/nomenclatures`. Без него резерв создаётся без привязки к конкретному товару."
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 1,
                    "description": "кол-во, ≥ 1"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единицы измерения (`GET /api/storage_units`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "price": {
                    "type": "integer",
                    "example": 100,
                    "description": "цена decimal-string (`\"1000.00\"`)"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID ставки НДС (`GET /api/vats`) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  }
                },
                "required": [
                  "quantity"
                ]
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/nomenclatures/{nomenclatureId}": {
      "put": {
        "summary": "Обновление товаров в заказе",
        "operationId": "order-nomenclature-update",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "nomenclatureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 23,
                      "description": "ID (первичный ключ) товарной позиции в заказе"
                    },
                    "orderNomenclature": {
                      "type": "object",
                      "properties": {
                        "warehouseNomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/kcdDZKHha8HbujO4z80uYmOsayHHxTXZrM2q6GEN.webp",
                              "format": "uri"
                            },
                            "name": {
                              "type": "string",
                              "example": "BANILA CO Glow Fit Foundation Brush / Склад Петухова / 5 ед / 204500.00 руб"
                            }
                          },
                          "description": "объект с информацией о товаре, хранимом на складе"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "description": "кол-во товара"
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-06-24T09:57:10.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "price": {
                          "type": "string",
                          "example": "1.00",
                          "format": "decimal",
                          "description": "цена товара"
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Без НДС"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-08-12T08:51:40.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "НДС"
                        },
                        "amount": {
                          "type": "string",
                          "example": "1.00",
                          "format": "decimal",
                          "description": "общая стоимость товарной позиции"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-nomenclature-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID номенклатуры (`GET /api/nomenclatures`)"
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 1,
                    "description": "кол-во товара"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID единицы измерения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/storage_units"
                      ]
                    }
                  },
                  "price": {
                    "type": "integer",
                    "example": 100,
                    "description": "стоимость товара"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID НДС Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/vats"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление товаров из заказа",
        "operationId": "order-nomenclature-delete",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "nomenclatureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Order nomenclature deleted",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-nomenclature-delete"
        }
      }
    },
    "/api/tables/orders/{id}/files": {
      "get": {
        "summary": "Получение списка файлов (табличное представление)",
        "operationId": "order-files-table",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 34,
                            "description": "первичный ключ"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 5
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        }
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 4,
                            "description": "первичный ключ"
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "создатель файла"
                          },
                          "name": {
                            "type": "string",
                            "example": "Rating container.svg",
                            "description": "имя файла"
                          },
                          "path": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/u7TY0sLEoWiFgeglUHHbWgchUIS41yhAPZ0uMuYX.svg",
                            "format": "uri",
                            "description": "ссылка на загрузку файла"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "18.04.2024 13:50",
                            "description": "дата/время загрузки файла"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-files-table"
        }
      }
    },
    "/api/orders/{id}/files": {
      "post": {
        "summary": "Добавление файла",
        "operationId": "order-file-create",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 593,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Инфо Агбис (2).txt",
                          "description": "имя файла"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Документ к заказу",
                              "description": "имя файла"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time",
                              "description": "дата/время загрузки файла"
                            }
                          },
                          "description": "объект с информацией о типе загружаемого файла"
                        },
                        "path": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/QWu9ghBy6kfsXsEQZBuIqhpEoY8ghrCIFZhBdpwj.txt",
                          "format": "uri",
                          "description": "ссылка на загрузку файла"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-07-31T07:06:37.000000Z",
                          "format": "date-time",
                          "description": "дата/время загрузки файла"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-07-31T07:06:37.000000Z",
                          "format": "date-time",
                          "description": "дата/время последнего обновления файла"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-file-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "example": "FILE('path')",
                    "description": "загружаемый документ"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по заказу",
        "operationId": "order-history",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "icon": {
                                "type": "string",
                                "example": "done",
                                "description": "иконка"
                              },
                              "color": {
                                "type": "string",
                                "example": "success",
                                "description": "цвет"
                              },
                              "title": {
                                "type": "string",
                                "example": "Создан заказ №18",
                                "description": "заголовок"
                              },
                              "description": {
                                "type": "string",
                                "example": "Создал(-а) Артём Полищук",
                                "description": "описание"
                              },
                              "dateTime": {
                                "type": "string",
                                "example": "31.07.2024"
                              }
                            }
                          }
                        },
                        "first_page_url": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/orders/18/history?page=1",
                          "format": "uri"
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page_url": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/orders/18/history?page=1",
                          "format": "uri"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "example": null
                              },
                              "label": {
                                "type": "string",
                                "example": "&laquo; Предыдущая"
                              },
                              "active": {
                                "type": "boolean",
                                "example": false
                              }
                            }
                          }
                        },
                        "next_page_url": {
                          "example": null
                        },
                        "path": {
                          "type": "string",
                          "example": "https://api.gigma.ru/api/orders/18/history",
                          "format": "uri"
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "prev_page_url": {
                          "example": null
                        },
                        "to": {
                          "type": "integer",
                          "example": 2
                        },
                        "total": {
                          "type": "integer",
                          "example": 2
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-history"
        }
      }
    },
    "/api/orders/{id}/request-refund": {
      "post": {
        "summary": "Запрос возврата по заказу",
        "operationId": "order-request-refund",
        "tags": [
          "Платформа / Заказы и исполнение"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Заказы/#order-request-refund"
        },
        "description": "Создаёт запрос на возврат по заказу. Фиксирует время запроса, инициатора и комментарий.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string",
                    "example": "Товар не подошёл по размеру",
                    "description": "причина возврата"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/tasks": {
      "get": {
        "summary": "Получение списка задач (табличное представление)",
        "operationId": "tasks-table",
        "tags": [
          "Платформа / Задачи команды"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка (min: 3 символа)"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "фильтр по дате (от)"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "фильтр по дате (до)"
            }
          },
          {
            "name": "creator_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID создателей задачи"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "executor_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID исполнителей задачи"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "order_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID заказов"
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "task_status_id[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "массив ID статусов (`GET /api/task_statuses`): 1=В работе, 2=Просрочена, 3=Выполнена Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/task_statuses"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "текущая страница"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "кол-во элементов на странице"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 3
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "id"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "№"
                          }
                        },
                        "description": "массив столбцов таблицы"
                      },
                      "description": "массив столбцов таблицы"
                    },
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 12
                          },
                          "name": {
                            "type": "string",
                            "example": "Позвонить клиенту"
                          },
                          "executor": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Иванов Алексей"
                              }
                            }
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "В работе"
                              }
                            }
                          },
                          "started_at": {
                            "type": "string",
                            "example": "16.05.2026 09:00"
                          },
                          "finished_at": {
                            "type": "string",
                            "example": "16.05.2026 18:00"
                          }
                        },
                        "description": "массив задач"
                      },
                      "description": "массив задач"
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "объект пагинации"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Задачи/#tasks-table"
        }
      }
    },
    "/api/tasks": {
      "get": {
        "summary": "Получение списка задач (JSON)",
        "operationId": "tasks-list",
        "tags": [
          "Платформа / Задачи команды"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 12
                          },
                          "name": {
                            "type": "string",
                            "example": "Позвонить клиенту"
                          },
                          "started_at": {
                            "type": "string",
                            "example": "2026-05-16T09:00:00.000000Z",
                            "format": "date-time"
                          },
                          "finished_at": {
                            "type": "string",
                            "example": "2026-05-16T18:00:00.000000Z",
                            "format": "date-time"
                          },
                          "create_everyday": {
                            "type": "boolean",
                            "example": false
                          },
                          "duration": {
                            "type": "string",
                            "example": "9 ч"
                          },
                          "executor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 5
                              },
                              "name": {
                                "type": "string",
                                "example": "Иванов Алексей"
                              }
                            }
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            }
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "В работе"
                              }
                            }
                          },
                          "order": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 42
                              },
                              "name": {
                                "type": "string",
                                "example": "Заказ №42"
                              }
                            }
                          },
                          "object": {
                            "example": null
                          },
                          "notifications": {
                            "type": "array",
                            "items": {}
                          },
                          "stage": {
                            "example": null
                          },
                          "progress": {
                            "example": null
                          }
                        }
                      }
                    },
                    "tasksCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Задачи/#tasks-list"
        }
      },
      "post": {
        "summary": "Создание задачи",
        "operationId": "task-create",
        "tags": [
          "Платформа / Задачи команды"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13
                        },
                        "name": {
                          "type": "string",
                          "example": "Позвонить клиенту"
                        },
                        "started_at": {
                          "type": "string",
                          "example": "2026-05-17T09:00:00.000000Z",
                          "format": "date-time"
                        },
                        "finished_at": {
                          "type": "string",
                          "example": "2026-05-17T18:00:00.000000Z",
                          "format": "date-time"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-05-17T08:30:00.000000Z",
                          "format": "date-time"
                        },
                        "create_everyday": {
                          "type": "boolean",
                          "example": false
                        },
                        "duration": {
                          "type": "string",
                          "example": "9 ч"
                        },
                        "executor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Алексей"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "В работе"
                            }
                          }
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "name": {
                              "type": "string",
                              "example": "Заказ №42"
                            }
                          }
                        },
                        "object": {
                          "example": null
                        },
                        "notifications": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Технический"
                              }
                            }
                          }
                        },
                        "stage": {
                          "example": null
                        },
                        "progress": {
                          "example": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Задачи/#task-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Позвонить клиенту",
                    "description": "название задачи"
                  },
                  "started_at": {
                    "type": "string",
                    "example": "2026-05-17 09:00:00",
                    "description": "дата/время начала, ISO 8601"
                  },
                  "finished_at": {
                    "type": "string",
                    "example": "2026-05-17 18:00:00",
                    "description": "дата/время срока, ISO 8601, должна быть позже `started_at`"
                  },
                  "executor_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID исполнителя (`GET /api/users`)"
                  },
                  "order_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID заказа (`GET /api/orders`)"
                  },
                  "create_everyday": {
                    "type": "boolean",
                    "example": false,
                    "description": "повторять задачу ежедневно"
                  },
                  "notifications": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID отделов для уведомлений (`GET /api/departments`)"
                    },
                    "description": "массив ID отделов для уведомлений (`GET /api/departments`)"
                  }
                },
                "required": [
                  "name",
                  "started_at",
                  "finished_at",
                  "executor_id",
                  "order_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tasks/{id}": {
      "get": {
        "summary": "Получение выбранной задачи",
        "operationId": "task-show",
        "tags": [
          "Платформа / Задачи команды"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 12,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Позвонить клиенту",
                          "description": "название задачи"
                        },
                        "started_at": {
                          "type": "string",
                          "example": "2026-05-16T09:00:00.000000Z",
                          "format": "date-time",
                          "description": "дата/время начала"
                        },
                        "finished_at": {
                          "type": "string",
                          "example": "2026-05-16T18:00:00.000000Z",
                          "format": "date-time",
                          "description": "дата/время срока выполнения"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-05-16T08:00:00.000000Z",
                          "format": "date-time",
                          "description": "дата/время создания записи"
                        },
                        "create_everyday": {
                          "type": "boolean",
                          "example": false,
                          "description": "повторять каждый день (boolean)"
                        },
                        "duration": {
                          "type": "string",
                          "example": "9 ч",
                          "description": "строка длительности (`\"9 ч\"`)"
                        },
                        "executor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Алексей",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект исполнителя"
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект создателя задачи"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "В работе",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект статуса (`GET /api/task_statuses`)"
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Заказ №42",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект связанного заказа"
                        },
                        "object": {
                          "example": null,
                          "description": "произвольная строка-метка объекта"
                        },
                        "notifications": {
                          "type": "array",
                          "items": {},
                          "description": "массив отделов, получающих уведомление (`GET /api/departments`)"
                        },
                        "stage": {
                          "example": null,
                          "description": "этап и прогресс (опционально)"
                        },
                        "progress": {
                          "example": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Задачи/#task-show"
        }
      },
      "put": {
        "summary": "Редактирование задачи",
        "operationId": "task-update",
        "tags": [
          "Платформа / Задачи команды"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Задачи/#task-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "task_status_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID нового статуса: 1=В работе, 2=Просрочена, 3=Выполнена Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/task_statuses"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/applications/{id}/blocks": {
      "get": {
        "summary": "Получение списка блоков (табличное представление)",
        "operationId": "blocks-table",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 149,
                            "description": "первичный ключ (номер заказа)"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 19
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "code"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "Код"
                          }
                        },
                        "description": "массив столбцов"
                      },
                      "description": "массив столбцов"
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "example": null
                              },
                              "value": {
                                "type": "integer",
                                "example": 7
                              },
                              "url": {
                                "type": "string",
                                "example": ""
                              }
                            },
                            "description": "первичный ключ (номер заказа)"
                          },
                          "date": {
                            "type": "string",
                            "example": "25 янв 2025"
                          },
                          "name": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Видео на главной странице"
                              }
                            },
                            "description": "название блока"
                          },
                          "path": {
                            "type": "string",
                            "example": "> Главная > Видео на главной странице"
                          },
                          "block_type": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Картинка"
                              }
                            },
                            "description": "объект с информацией о типе блока"
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/api//storage/uploads/cdO1uLpgY29TgnFLhaJWQkjK8VDxMg2fk3dp0ihW.png",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Воронова София"
                              },
                              "link": {
                                "type": "string",
                                "example": "https://beta.gigma.ru/users/list-users/66",
                                "format": "uri"
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "объект с информацией, необходимой для пагинации"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#blocks-table"
        }
      }
    },
    "/api/applications/{id}/blocks": {
      "get": {
        "summary": "Получение списка блоков",
        "operationId": "blocks-list",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 8
                      },
                      "code": {
                        "type": "integer",
                        "example": 1
                      },
                      "name": {
                        "type": "string",
                        "example": "Первый блок (текстовый)"
                      },
                      "avatar": {
                        "example": null
                      },
                      "block_type": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Обычный текст"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/api//storage/uploads/image-profile-1.svg",
                            "format": "uri"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2025-01-23T09:47:38.000000Z",
                            "format": "date-time"
                          }
                        }
                      },
                      "link": {
                        "example": null
                      },
                      "file": {
                        "example": null
                      },
                      "text": {
                        "type": "string",
                        "example": "Текст"
                      },
                      "parent": {
                        "example": null
                      },
                      "children": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 9
                            },
                            "code": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Второй блок"
                            },
                            "avatar": {
                              "example": null
                            },
                            "block_type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 5
                                },
                                "name": {
                                  "type": "string",
                                  "example": "URL ссылка"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/api//storage/uploads/image-profile-4.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2025-01-23T09:47:38.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "link": {
                              "type": "string",
                              "example": "https://yandex.ru",
                              "format": "uri"
                            },
                            "file": {
                              "example": null
                            },
                            "text": {
                              "example": null
                            },
                            "parent": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 8
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Первый блок (текстовый)"
                                }
                              }
                            },
                            "children": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 10
                                  },
                                  "code": {
                                    "type": "integer",
                                    "example": 3
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Третий блок"
                                  },
                                  "avatar": {
                                    "example": null
                                  },
                                  "block_type": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 3
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Картинка"
                                      },
                                      "avatar": {
                                        "type": "string",
                                        "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                                        "format": "uri"
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "example": "2025-01-23T09:47:38.000000Z",
                                        "format": "date-time"
                                      }
                                    }
                                  },
                                  "link": {
                                    "example": null
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 2827
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png"
                                      },
                                      "type": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "integer",
                                            "example": 1
                                          },
                                          "name": {
                                            "type": "string",
                                            "example": "Трудовой договор"
                                          },
                                          "avatar": {
                                            "type": "string",
                                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                            "format": "uri"
                                          },
                                          "created_at": {
                                            "type": "string",
                                            "example": "2024-03-27T07:00:46.000000Z",
                                            "format": "date-time"
                                          }
                                        }
                                      },
                                      "path": {
                                        "type": "string",
                                        "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png",
                                        "format": "uri"
                                      },
                                      "link": {
                                        "example": null
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "example": "2025-01-27T14:17:14.000000Z",
                                        "format": "date-time"
                                      },
                                      "updated_at": {
                                        "type": "string",
                                        "example": "2025-01-27T14:17:14.000000Z",
                                        "format": "date-time"
                                      }
                                    }
                                  },
                                  "text": {
                                    "example": null
                                  },
                                  "parent": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 9
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Второй блок"
                                      }
                                    }
                                  },
                                  "children": {
                                    "type": "array",
                                    "items": {}
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "example": "2025-01-27T14:17:14.000000Z",
                                    "format": "date-time"
                                  }
                                }
                              }
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-27T14:12:38.000000Z",
                              "format": "date-time"
                            }
                          }
                        }
                      },
                      "created_at": {
                        "type": "string",
                        "example": "2025-01-27T13:03:19.000000Z",
                        "format": "date-time"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#blocks-list"
        }
      },
      "post": {
        "summary": "Добавление блока",
        "operationId": "block-create",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "code": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Параметр 1"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-23T09:47:38.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "link": {
                          "example": null
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "text": {
                          "example": null
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Видео рекламного слайдера"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2025-01-23T17:59:03.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#block-create"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "block_type_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID типа блока из справочника"
                  },
                  "name": {
                    "type": "string",
                    "example": "Параметр 1",
                    "description": "имя блока"
                  },
                  "link": {
                    "example": null,
                    "description": "URL ссылка. Обязателен, если `block_type_id` = 4 или `block_type_id` = 5"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара, загруженного при помощи запроса добавления файла"
                  },
                  "file_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3"
                  },
                  "text": {
                    "example": null,
                    "description": "текстовый контент блока. Обязателен, если `block_type_id` = 1 или `block_type_id` = 2"
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительского блока из запроса получения списка блоков"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/applications/{application_id}/blocks/{id}": {
      "get": {
        "summary": "Получение выбранного блока",
        "operationId": "block-show",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 10,
                          "description": "первичный ключ (номер блока)"
                        },
                        "code": {
                          "type": "integer",
                          "example": 3,
                          "description": "код блока"
                        },
                        "name": {
                          "type": "string",
                          "example": "Третий блок",
                          "description": "название блока"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2827,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер блока)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "объект с информацией об аватаре"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time",
                                  "description": "дата добавления в систему"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png",
                              "format": "uri"
                            },
                            "link": {
                              "example": null,
                              "description": "URL ссылка"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "format": "date-time",
                              "description": "дата добавления в систему"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией об аватаре"
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "название блока"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                              "format": "uri",
                              "description": "объект с информацией об аватаре"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-23T09:47:38.000000Z",
                              "format": "date-time",
                              "description": "дата добавления в систему"
                            }
                          },
                          "description": "объект с информацией о типе блока"
                        },
                        "link": {
                          "example": null,
                          "description": "URL ссылка"
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2827,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер блока)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "объект с информацией об аватаре"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time",
                                  "description": "дата добавления в систему"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png",
                              "format": "uri"
                            },
                            "link": {
                              "example": null,
                              "description": "URL ссылка"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "format": "date-time",
                              "description": "дата добавления в систему"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "объект с информацией о прикреплённом файле"
                        },
                        "text": {
                          "example": null,
                          "description": "текстовый контент блока"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 9,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Второй блок",
                              "description": "название блока"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {},
                          "description": "массив объектов типа \"Блок\", которые являются подчиненными сущностями выбранного элемента"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2025-01-27T14:17:14.000000Z",
                          "format": "date-time",
                          "description": "дата добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#block-show"
        }
      },
      "put": {
        "summary": "Редактирование блока",
        "operationId": "block-update",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "code": {
                          "type": "integer",
                          "example": 10
                        },
                        "name": {
                          "type": "string",
                          "example": "Видео рекламного слайдера"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.png"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/igbcW8dPebcrVfnbC2A2Zptf1nruFcF8Nmf8sVTG.png",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:11:00.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:11:00.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2025-01-23T09:47:38.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "link": {
                          "example": null
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.png"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/igbcW8dPebcrVfnbC2A2Zptf1nruFcF8Nmf8sVTG.png",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:11:00.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:11:00.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "text": {
                          "example": null
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Видео рекламного слайдера"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2025-01-23T17:44:00.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#block-update"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "block_type_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID типа блока из справочника"
                  },
                  "name": {
                    "type": "string",
                    "example": "Видео рекламного слайдера",
                    "description": "имя блока"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID аватара, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3"
                  },
                  "file_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3"
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительского блока из запроса получения списка блоков"
                  },
                  "code": {
                    "type": "integer",
                    "example": 10,
                    "description": "код блока"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление блока",
        "operationId": "block-delete",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Block successfully deleted",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#block-delete"
        }
      }
    },
    "/api/applications/{application_id}/blocks/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по блоку",
        "operationId": "block-history",
        "tags": [
          "Платформа / Контентные блоки"
        ],
        "parameters": [
          {
            "name": "application_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "histories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2174,
                            "description": "первичный ключ"
                          },
                          "icon": {
                            "type": "string",
                            "example": "check",
                            "description": "иконка"
                          },
                          "color": {
                            "type": "string",
                            "example": "primary",
                            "description": "цвет"
                          },
                          "title": {
                            "type": "string",
                            "example": "Создание",
                            "description": "заголовок"
                          },
                          "description": {
                            "type": "string",
                            "example": "Создание: Воронова София",
                            "description": "описание"
                          },
                          "datetime": {
                            "type": "string",
                            "example": "23.01.2025 15:57",
                            "description": "дата выполнения действия"
                          }
                        }
                      }
                    },
                    "historiesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Блоки/#block-history"
        }
      }
    },
    "/api/tables/pages": {
      "get": {
        "summary": "Получение списка страниц (табличное представление)",
        "operationId": "list-pages",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "application_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "ID приложения Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/applications"
                ]
              }
            }
          },
          {
            "name": "page_type_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "ID типа страницы Актуальные значения получите из справочника.",
              "x-gigma-dictionary": {
                "dynamic": true,
                "paths": [
                  "/api/page_types",
                  "/api/counterparty/page_types"
                ]
              }
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "сортировка: `date_asc`, `date_desc`, `popularity_asc`, `popularity_desc`"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "номер страницы для пагинации"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "элементов на странице"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 135,
                            "description": "ID страницы"
                          },
                          "table_id": {
                            "type": "integer",
                            "example": 17
                          },
                          "order": {
                            "type": "integer",
                            "example": 0
                          },
                          "key": {
                            "type": "string",
                            "example": "code"
                          },
                          "has_icon": {
                            "type": "integer",
                            "example": 0
                          },
                          "text": {
                            "type": "string",
                            "example": "Код"
                          }
                        },
                        "description": "массив столбцов таблицы"
                      },
                      "description": "массив столбцов таблицы"
                    },
                    "contents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 12,
                            "description": "ID страницы"
                          },
                          "code": {
                            "example": null,
                            "description": "код страницы"
                          },
                          "date": {
                            "type": "string",
                            "example": "13.05.2024",
                            "description": "дата создания (только в табличном представлении)"
                          },
                          "title": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Создание идивидуальго проекта"
                              }
                            },
                            "description": "название с иконкой"
                          },
                          "type": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Страница"
                              }
                            },
                            "description": "тип страницы с иконкой"
                          },
                          "slug": {
                            "type": "string",
                            "example": "proektnye-raboty",
                            "description": "идентификатор URL"
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "icon": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg",
                                "format": "uri"
                              },
                              "value": {
                                "type": "string",
                                "example": "Иванов Василий"
                              },
                              "link": {
                                "type": "string",
                                "example": "https://beta.gigma.ru/users/list-users/39",
                                "format": "uri"
                              }
                            },
                            "description": "создатель с ссылкой"
                          },
                          "status": {
                            "type": "string",
                            "example": "Черновик",
                            "description": "статус публикации (только в табличном представлении; в ресурсе `GET /api/pages/{id}` этого поля нет)"
                          }
                        },
                        "description": "массив данных страниц (в табличном формате)"
                      },
                      "description": "массив данных страниц (в табличном формате)"
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 9
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 9
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "информация для пагинации"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#list-pages"
        }
      }
    },
    "/api/pages/{id}": {
      "get": {
        "summary": "Получение выбранной страницы (контента)",
        "operationId": "get_api_pages_id",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 12,
                          "description": "ID страницы"
                        },
                        "code": {
                          "example": null,
                          "description": "код страницы"
                        },
                        "avatar": {
                          "example": null,
                          "description": "аватар страницы"
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг (true=страница, false=блок)"
                        },
                        "views_count": {
                          "type": "integer",
                          "example": 27,
                          "description": "кол-во просмотров"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "аватар страницы"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-31T11:14:22.000000Z",
                              "format": "date-time",
                              "description": "дата создания"
                            }
                          },
                          "description": "информация о типе"
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39,
                              "description": "ID страницы"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg",
                              "format": "uri",
                              "description": "аватар страницы"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          },
                          "description": "данные создателя"
                        },
                        "slug": {
                          "type": "string",
                          "example": "proektnye-raboty",
                          "description": "URL-идентификатор"
                        },
                        "title": {
                          "type": "string",
                          "example": "Создание идивидуальго проекта",
                          "description": "название"
                        },
                        "meta_title": {
                          "example": null,
                          "description": "meta-заголовок"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2066,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "image1.png"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID страницы"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri",
                                  "description": "аватар страницы"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time",
                                  "description": "дата создания"
                                }
                              },
                              "description": "информация о типе"
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/iT6Bvuu2DQrFIAF9SMkqnVtyh8uXvECkpIt4OkgR.png",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-11-13T09:51:36.000000Z",
                              "format": "date-time",
                              "description": "дата создания"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-11-13T09:51:36.000000Z",
                              "format": "date-time"
                            }
                          },
                          "description": "превью-изображение"
                        },
                        "description": {
                          "type": "string",
                          "example": "Создание идивидуальго проекта",
                          "description": "описание"
                        },
                        "meta_description": {
                          "example": null,
                          "description": "meta-описание"
                        },
                        "content": {
                          "type": "string",
                          "example": "<p>В нашем интернет-магазине вы можете недорого купить скрабы для очищения и отшелушивания кожи. У нас представлена корейская косметика самых известных брендов, с подробным описанием, составами и отзывами покупателей. Мы предлагаем вам отшелушивающие скрабы по выгодной цене с доставкой по всей России, как в пункты выдачи заказов, так и по вашему персональному адресу. Возможен наложенный платеж. </p>",
                          "description": "контент в формате HTML"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "https://nsksm.ru",
                              "format": "uri"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri",
                              "description": "аватар страницы"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-08T08:46:23.000000Z",
                              "format": "date-time",
                              "description": "дата создания"
                            }
                          },
                          "description": "привязанное приложение"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-05-13T05:29:39.000000Z",
                          "format": "date-time",
                          "description": "дата создания"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#get-page"
        }
      },
      "put": {
        "summary": "Редактирование страницы (контента)",
        "operationId": "update-page",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 36
                        },
                        "code": {
                          "type": "string",
                          "example": "1235"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true
                        },
                        "views_count": {
                          "type": "integer",
                          "example": 0
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-31T11:14:22.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg",
                              "format": "uri"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          }
                        },
                        "slug": {
                          "type": "string",
                          "example": "news-3"
                        },
                        "title": {
                          "type": "string",
                          "example": "Скоро запуск веб-сайта!"
                        },
                        "meta_title": {
                          "type": "string",
                          "example": "Запуск веб-сайта на платформе gigma.ru"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "Описание текстовом формате"
                        },
                        "meta_description": {
                          "type": "string",
                          "example": "Meta описание"
                        },
                        "content": {
                          "type": "string",
                          "example": "HTML content"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23
                            },
                            "name": {
                              "type": "string",
                              "example": "https://nsksm.ru",
                              "format": "uri"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-08T08:46:23.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Важное"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-11-14T14:01:51.000000Z",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-11-27T09:34:29.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#update-page"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "1235",
                    "description": "код страницы"
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 23,
                    "description": "ID приложения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара"
                  },
                  "is_page": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг (true/false)"
                  },
                  "page_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа страницы Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/page_types",
                        "/api/counterparty/page_types"
                      ]
                    }
                  },
                  "slug": {
                    "type": "string",
                    "example": "news-3",
                    "description": "slug"
                  },
                  "title": {
                    "type": "string",
                    "example": "Скоро запуск веб-сайта!",
                    "description": "название"
                  },
                  "meta_title": {
                    "type": "string",
                    "example": "Запуск веб-сайта на платформе gigma.ru",
                    "description": "meta-заголовок"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID превью"
                  },
                  "description": {
                    "type": "string",
                    "example": "Описание текстовом формате",
                    "description": "описание"
                  },
                  "meta_description": {
                    "type": "string",
                    "example": "Meta описание",
                    "description": "meta-описание"
                  },
                  "content": {
                    "type": "string",
                    "example": "HTML content",
                    "description": "HTML-контент"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID тегов"
                    },
                    "description": "массив ID тегов"
                  }
                },
                "required": [
                  "application_id",
                  "is_page",
                  "page_type_id",
                  "slug",
                  "title"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление страницы (контента)",
        "operationId": "delete-page",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Page successfully destroyed",
                      "description": "информационное сообщение о результате операции"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#delete-page"
        }
      }
    },
    "/api/pages": {
      "post": {
        "summary": "Добавление страницы",
        "operationId": "create-page",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 36
                        },
                        "code": {
                          "type": "string",
                          "example": "1235"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true
                        },
                        "views_count": {
                          "example": null
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-31T11:14:22.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg",
                              "format": "uri"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          }
                        },
                        "slug": {
                          "type": "string",
                          "example": "news-3"
                        },
                        "title": {
                          "type": "string",
                          "example": "Скоро запуск веб-сайта!"
                        },
                        "meta_title": {
                          "type": "string",
                          "example": "Запуск веб-сайта на платформе gigma.ru"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "format": "uri"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                              "format": "uri"
                            },
                            "link": {
                              "example": null
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "example": "2024-04-14T20:04:32.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "Описание текстовом формате"
                        },
                        "meta_description": {
                          "type": "string",
                          "example": "Meta описание"
                        },
                        "content": {
                          "type": "string",
                          "example": "HTML content"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23
                            },
                            "name": {
                              "type": "string",
                              "example": "https://nsksm.ru",
                              "format": "uri"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-10-08T08:46:23.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Важное"
                              },
                              "avatar": {
                                "type": "string",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "format": "uri"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-11-14T14:01:51.000000Z",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-11-27T09:34:29.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#create-page"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "1235",
                    "description": "код страницы"
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 23,
                    "description": "ID приложения Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/applications"
                      ]
                    }
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара"
                  },
                  "is_page": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг типа (true/false)"
                  },
                  "page_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа страницы Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/page_types",
                        "/api/counterparty/page_types"
                      ]
                    }
                  },
                  "slug": {
                    "type": "string",
                    "example": "news-3",
                    "description": "slug"
                  },
                  "title": {
                    "type": "string",
                    "example": "Скоро запуск веб-сайта!",
                    "description": "название"
                  },
                  "meta_title": {
                    "type": "string",
                    "example": "Запуск веб-сайта на платформе gigma.ru",
                    "description": "meta-заголовок"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID превью"
                  },
                  "description": {
                    "type": "string",
                    "example": "Описание текстовом формате",
                    "description": "описание"
                  },
                  "meta_description": {
                    "type": "string",
                    "example": "Meta описание",
                    "description": "meta-описание"
                  },
                  "content": {
                    "type": "string",
                    "example": "HTML content",
                    "description": "HTML-контент"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1,
                      "description": "массив ID тегов"
                    },
                    "description": "массив ID тегов"
                  }
                },
                "required": [
                  "application_id",
                  "is_page",
                  "page_type_id",
                  "slug",
                  "title"
                ]
              }
            }
          }
        }
      }
    },
    "/api/pages/{page}/history": {
      "get": {
        "summary": "Получение истории изменений страницы",
        "operationId": "page-history",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaravelPaginator"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#page-history"
        }
      }
    },
    "/api/page_tags": {
      "get": {
        "summary": "Получение списка тегов",
        "operationId": "list-page-tags",
        "tags": [
          "Платформа / Страницы и публикации"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageTags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ тега"
                          },
                          "name": {
                            "type": "string",
                            "example": "Важное",
                            "description": "название тега"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri",
                            "description": "URL аватара"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-11-14T14:01:51.000000Z",
                            "format": "date-time",
                            "description": "дата добавления в систему"
                          }
                        }
                      }
                    },
                    "pageTagsCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество тегов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Страницы/#list-page-tags"
        }
      }
    },
    "/api/menus": {
      "get": {
        "summary": "Меню текущего пользователя",
        "operationId": "menu-get",
        "tags": [
          "Платформа / Меню сотрудников"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Главное меню"
                          },
                          "is_default": {
                            "type": "boolean",
                            "example": true
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Меню/#menu-get"
        },
        "description": "Возвращает корневое меню текущего авторизованного пользователя (определяется по Bearer токену)."
      }
    },
    "/api/menus/default/items": {
      "get": {
        "summary": "Пункты меню по умолчанию",
        "operationId": "menu-default-items",
        "tags": [
          "Платформа / Меню сотрудников"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menuItems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID пункта"
                          },
                          "menu_id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID меню-владельца"
                          },
                          "parent_id": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "example": null,
                            "description": "ID родителя (`null` для корневых)"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/dashboard.svg",
                            "format": "uri",
                            "description": "URL иконки"
                          },
                          "name": {
                            "type": "string",
                            "example": "Дашборд",
                            "description": "отображаемое название"
                          },
                          "url": {
                            "type": "string",
                            "example": "/dashboard",
                            "description": "путь, на который ведёт пункт (опционально, у группирующих пунктов отсутствует)"
                          },
                          "children": {
                            "type": "array",
                            "items": {}
                          }
                        }
                      }
                    },
                    "menuItemsCount": {
                      "type": "integer",
                      "example": 3,
                      "description": "общее количество пунктов"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Меню/#menu-default-items"
        },
        "description": "Возвращает дерево пунктов меню по умолчанию (то, что показывается в sidebar админки)."
      }
    },
    "/api/users/{id}/attach_menu": {
      "post": {
        "summary": "Скопировать меню текущего пользователя указанному",
        "operationId": "attach-menu-user",
        "tags": [
          "Платформа / Меню сотрудников"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been attached."
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Меню/#attach-menu-user"
        },
        "description": "Берёт меню текущего (авторизованного) пользователя и привязывает его к пользователю с указанным `id`. Тело запроса пустое — оба меню определяются из контекста: текущий пользователь по токену, целевой по URL."
      }
    },
    "/api/attach_menu_to_project": {
      "post": {
        "summary": "Скопировать меню текущего пользователя всем пользователям проекта",
        "operationId": "attach-menu-project",
        "tags": [
          "Платформа / Меню сотрудников"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been attached."
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Меню/#attach-menu-project"
        },
        "description": "Берёт меню текущего пользователя и применяет его ко всем пользователям его текущего проекта (бизнеса)."
      }
    },
    "/api/users/{id}/create_menu_from_user_items": {
      "post": {
        "summary": "Сохранить меню пользователя как шаблон",
        "operationId": "create-menu-from-user",
        "tags": [
          "Платформа / Меню сотрудников"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been created."
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Меню/#create-menu-from-user"
        },
        "description": "Создаёт новое именованное меню (шаблон) на основе текущего меню указанного пользователя.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Главное меню (Retail)",
                    "description": "название нового меню"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/files": {
      "post": {
        "summary": "Загрузка файла",
        "operationId": "upload-file",
        "tags": [
          "Платформа / Файлы и медиа"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2201,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "downloader.py",
                          "description": "имя загруженного файла"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Трудовой договор",
                              "description": "имя загруженного файла"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time",
                              "description": "таймстампы"
                            }
                          },
                          "description": "объект типа файла"
                        },
                        "path": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/7NYkKhv2Tm9CGlpcDzzLcsrKtrce8K39M4uU9pDw",
                          "format": "uri",
                          "description": "публичный URL файла"
                        },
                        "link": {
                          "type": "string",
                          "example": "https://google.ru",
                          "format": "uri",
                          "description": "произвольная URL ссылка (если передана)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-12-03T10:42:18.000000Z",
                          "format": "date-time",
                          "description": "таймстампы"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-12-03T10:42:18.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Файлы/#upload-file"
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "содержимое файла (обязательно)"
                  },
                  "file_type_id": {
                    "type": "integer",
                    "description": "ID типа файла из `/api/file_types` (обязательно) Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/file_types"
                      ]
                    }
                  },
                  "link": {
                    "type": "string",
                    "description": "произвольная URL ссылка (опционально, например на видео)"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/files/{id}": {
      "get": {
        "summary": "Получение файла по ID",
        "operationId": "get-file",
        "tags": [
          "Платформа / Файлы и медиа"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "logo.svg"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Трудовой договор"
                            },
                            "avatar": {
                              "type": "string",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg",
                              "format": "uri"
                            },
                            "created_at": {
                              "type": "string",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "format": "date-time"
                            }
                          }
                        },
                        "path": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                          "format": "uri"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-04-14T20:04:32.000000Z",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2024-04-14T20:04:32.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Файлы/#get-file"
        }
      },
      "delete": {
        "summary": "Удаление файла",
        "operationId": "delete-file",
        "tags": [
          "Платформа / Файлы и медиа"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "File successfully deleted"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Файлы/#delete-file"
        }
      }
    },
    "/api/file_types": {
      "get": {
        "summary": "Получение списка типов файлов",
        "operationId": "list-file-types",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Трудовой договор",
                            "description": "тип файла"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2023-11-23T11:50:48.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "fileTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-file-types"
        }
      }
    },
    "/api/file_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа файла",
        "operationId": "get-file-type",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Трудовой договор",
                          "description": "тип файла"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-17T06:22:25.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-file-type"
        }
      }
    },
    "/api/screens": {
      "get": {
        "summary": "Получение списка экранов, к которым применяется проверка права на доступ",
        "operationId": "list-screens",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "screens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Контрагенты",
                            "description": "название экрана"
                          },
                          "permissions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 9,
                                  "description": "первичный ключ"
                                },
                                "screen": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 1,
                                      "description": "первичный ключ"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Контрагенты",
                                      "description": "название экрана"
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "example": "2024-03-27T07:00:46.000000Z",
                                      "format": "date-time"
                                    }
                                  }
                                },
                                "name": {
                                  "type": "string",
                                  "example": "view-counterparties",
                                  "description": "название экрана"
                                },
                                "description": {
                                  "type": "string",
                                  "example": "Просмотр контрагентов"
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "format": "date-time"
                                }
                              },
                              "description": "массив объектов, содержащих права доступа пользователя"
                            },
                            "description": "массив объектов, содержащих права доступа пользователя"
                          }
                        }
                      }
                    },
                    "screensCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-screens"
        }
      }
    },
    "/api/screens/{id}": {
      "get": {
        "summary": "Получение выбранного экрана со списком прав доступа",
        "operationId": "get-screen",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "screen": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Контрагенты",
                          "description": "название экрана"
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 9,
                                "description": "первичный ключ"
                              },
                              "screen": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 1,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Контрагенты",
                                    "description": "название экрана"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "example": "2024-03-27T07:00:46.000000Z",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "name": {
                                "type": "string",
                                "example": "view-counterparties",
                                "description": "название экрана"
                              },
                              "description": {
                                "type": "string",
                                "example": "Просмотр контрагентов"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "format": "date-time"
                              }
                            },
                            "description": "массив объектов, содержащих права доступа пользователя"
                          },
                          "description": "массив объектов, содержащих права доступа пользователя"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-screen"
        }
      }
    },
    "/api/counterparty_types": {
      "get": {
        "summary": "Получение списка с типами контрагентов",
        "operationId": "list-counterparty-types",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterpartyTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Клиент",
                            "description": "тип контрагента"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "counterpartyTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-counterparty-types"
        }
      }
    },
    "/api/counterparty_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа контрагента",
        "operationId": "get-counterparty-type",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterpartyType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Клиент",
                          "description": "тип контрагента"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-counterparty-type"
        }
      }
    },
    "/api/departments": {
      "get": {
        "summary": "Получение списка отделов",
        "operationId": "list-departments",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Технический",
                            "description": "название отдела"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2023-11-13T13:20:36.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "departmentsCount": {
                      "type": "integer",
                      "example": 5
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-departments"
        }
      },
      "post": {
        "summary": "Добавление отдела",
        "operationId": "create-department",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 6,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "IT",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:22:07.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#create-department"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "IT",
                    "description": "название отдела"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/departments/{id}": {
      "get": {
        "summary": "Получение выбранного отдела",
        "operationId": "get-department",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Технический",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:20:36.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-department"
        }
      },
      "put": {
        "summary": "Редактирование отдела",
        "operationId": "update-department",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 6,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "IT",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:22:07.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#update-department"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "IT",
                    "description": "название отдела"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранного отдела",
        "operationId": "delete-department",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Department successfully destroyed",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#delete-department"
        }
      }
    },
    "/api/roles": {
      "get": {
        "summary": "Получение списка ролей пользователей",
        "operationId": "list-roles",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "owner",
                            "description": "значение роли"
                          },
                          "description": {
                            "type": "string",
                            "example": "Собственник",
                            "description": "описание роли (на русском языке)"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "rolesCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-roles"
        }
      },
      "post": {
        "summary": "Добавление роли пользователя",
        "operationId": "create-role",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "accountant",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Бухгалтер",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:24:23.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#create-role"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "accountant",
                    "description": "код роли"
                  },
                  "description": {
                    "type": "string",
                    "example": "Бухгалтер",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/roles/{id}": {
      "get": {
        "summary": "Получение выбранной роли пользователя",
        "operationId": "get-role",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "owner",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Собственник",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-role"
        }
      },
      "put": {
        "summary": "Редактирование роли пользователя",
        "operationId": "update-role",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "accountant",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Бухгалтер",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:24:23.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#update-role"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "accountant",
                    "description": "код роли"
                  },
                  "description": {
                    "type": "string",
                    "example": "Бухгалтер",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранной роли пользователя",
        "operationId": "delete-role",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Role successfully deleted",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#delete-role"
        }
      }
    },
    "/api/permissions": {
      "get": {
        "summary": "Получение списка прав доступа",
        "operationId": "list-permissions",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "screen": {
                            "example": null
                          },
                          "name": {
                            "type": "string",
                            "example": "view-admins",
                            "description": "значение права доступа"
                          },
                          "description": {
                            "type": "string",
                            "example": "Просмотр администраторов",
                            "description": "описание права доступа (на русском языке)"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2023-11-16T09:07:19.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "permissionsCount": {
                      "type": "integer",
                      "example": 16
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-permissions"
        }
      },
      "post": {
        "summary": "Добавление права доступа",
        "operationId": "create-permission",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-admins",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование списка администраторов",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:31:38.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#create-permission"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "edit-admins",
                    "description": "значение права доступа"
                  },
                  "description": {
                    "type": "string",
                    "example": "Редактирование списка администраторов",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/permissions/{id}": {
      "get": {
        "summary": "Получение выбранного права доступа",
        "operationId": "get-permission",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-roles",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование ролей",
                          "description": "описание права доступа (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:20:36.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-permission"
        }
      },
      "put": {
        "summary": "Редактирование права доступа",
        "operationId": "update-permission",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-admins",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование списка администраторов",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-11-13T13:31:38.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#update-permission"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "edit-admins",
                    "description": "значение права доступа"
                  },
                  "description": {
                    "type": "string",
                    "example": "Редактирование списка администраторов",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранного права доступа",
        "operationId": "delete-permission",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Permission successfully deleted",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#delete-permission"
        }
      }
    },
    "/api/call_statuses": {
      "get": {
        "summary": "Получение списка статусов звонков",
        "operationId": "list-call-statuses",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "callStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Создан",
                            "description": "статус звонка"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2023-12-27T22:53:33.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "callStatusesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-call-statuses"
        }
      }
    },
    "/api/call_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса звонка",
        "operationId": "get-call-status",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "callStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Создан",
                          "description": "статус звонка"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-12-27T22:53:33.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-call-status"
        }
      }
    },
    "/api/order_statuses": {
      "get": {
        "summary": "Получение списка статусов заказов",
        "operationId": "list-order-statuses",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Новый",
                            "description": "статус заказа"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-01-08T05:21:59.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "orderStatusesCount": {
                      "type": "integer",
                      "example": 8
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-order-statuses"
        }
      }
    },
    "/api/order_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса заказа",
        "operationId": "get-order-status",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Новый",
                          "description": "статус заказа"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-01-08T05:21:59.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-order-status"
        }
      }
    },
    "/api/task_statuses": {
      "get": {
        "summary": "Получение списка статусов задач",
        "operationId": "list-task-statuses",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "В работе",
                            "description": "статус задачи"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-01-22T21:52:32.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "taskStatusesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-task-statuses"
        }
      }
    },
    "/api/task_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса задачи",
        "operationId": "get-task-status",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "В работе",
                          "description": "статус задачи"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-01-22T21:52:32.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-task-status"
        }
      }
    },
    "/api/cities": {
      "get": {
        "summary": "Список городов",
        "operationId": "cities-list",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Новосибирск"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "citiesCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#cities-list"
        }
      }
    },
    "/api/cities/{id}": {
      "get": {
        "summary": "Город по ID",
        "operationId": "city-get",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "Новосибирск"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#city-get"
        }
      }
    },
    "/api/countries": {
      "get": {
        "summary": "Получение списка стран",
        "operationId": "list-countries",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Россия",
                            "description": "страна"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri",
                            "description": "URL-адрес фотографии"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-04-10T06:59:28.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "countriesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-countries"
        }
      }
    },
    "/api/storage_units": {
      "get": {
        "summary": "Получение списка единиц измерения",
        "operationId": "list-storage-units",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "units": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Литр",
                            "description": "полное название"
                          },
                          "abbreviation": {
                            "type": "string",
                            "example": "л",
                            "description": "аббревиатура"
                          }
                        }
                      }
                    },
                    "unitsCount": {
                      "type": "integer",
                      "example": 10
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-storage-units"
        }
      }
    },
    "/api/storage_units/{id}": {
      "get": {
        "summary": "Получение выбранной единицы измерения",
        "operationId": "get-storage-unit",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Литр",
                          "description": "полное название"
                        },
                        "abbreviation": {
                          "type": "string",
                          "example": "л",
                          "description": "аббревиатура"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-storage-unit"
        }
      }
    },
    "/api/brands": {
      "get": {
        "summary": "Получение списка брендов",
        "operationId": "list-brands",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 45,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "COCODOR",
                            "description": "производитель"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/8M3PQIpdd3n4cQqM7cXUBILlMMTpZPyv8DdRYmAV.webp",
                            "format": "uri",
                            "description": "URL фотографии производителя"
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 37,
                                "description": "первичный ключ"
                              },
                              "title": {
                                "type": "string",
                                "example": "Торговля косметикой"
                              }
                            },
                            "description": "объект с информацией о направлении бизнеса"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-12-11T12:28:57.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "brandsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-brands"
        }
      },
      "post": {
        "summary": "Добавление бренда",
        "operationId": "create-brand",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 44,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "TEST",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-12-10T15:45:05.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#create-brand"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "TEST",
                    "description": "название торговой марки"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии торговой марки"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 15,
                    "description": "ID бизнеса Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/brands/{id}": {
      "get": {
        "summary": "Получение выбранного бренда",
        "operationId": "get-brand",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 45,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "COCODOR",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/8M3PQIpdd3n4cQqM7cXUBILlMMTpZPyv8DdRYmAV.webp",
                          "format": "uri",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 37,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-12-11T12:28:57.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-brand"
        }
      },
      "put": {
        "summary": "Обновление бренда",
        "operationId": "update-brand",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 44,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "TEST",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg",
                          "format": "uri",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля одеждой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2024-12-10T15:45:05.000000Z",
                          "format": "date-time",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#update-brand"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "TEST",
                    "description": "название торговой марки"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии торговой марки"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 14,
                    "description": "ID бизнеса Актуальные значения получите из справочника.",
                    "x-gigma-dictionary": {
                      "dynamic": true,
                      "paths": [
                        "/api/branches"
                      ]
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/objects": {
      "get": {
        "summary": "Получение списка объектов",
        "operationId": "list-objects",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wildberries",
                            "description": "название объекта"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/ypPdC9qVA2MZLbQ0l9nfS5LRlcMAVPiTBZhV31UY.svg",
                            "format": "uri",
                            "description": "URL на фотографию"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-07-27T18:15:28.000000Z",
                            "format": "date-time",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "objectsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-objects"
        }
      }
    },
    "/api/sales_channels": {
      "get": {
        "summary": "Получение списка каналов продаж",
        "operationId": "list-sales-channels",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "поисковая строка"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesChannels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Авито",
                            "description": "название канала продаж"
                          },
                          "avatar": {
                            "type": "string",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "format": "uri",
                            "description": "URL фотографии"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "format": "date-time",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "salesChannelsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-sales-channels"
        }
      }
    },
    "/api/vats": {
      "get": {
        "summary": "Получение списка НДС",
        "operationId": "list-vat",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Без НДС",
                            "description": "название значения НДС"
                          },
                          "value": {
                            "type": "string",
                            "example": "0.00",
                            "format": "decimal",
                            "description": "значение НДС в процентах"
                          }
                        }
                      }
                    },
                    "vatsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-vat"
        }
      }
    },
    "/api/vats/{id}": {
      "get": {
        "summary": "Получение выбранного значения НДС",
        "operationId": "get-vat",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vat": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Без НДС",
                          "description": "название значения НДС"
                        },
                        "value": {
                          "type": "string",
                          "example": "0.00",
                          "format": "decimal",
                          "description": "значение НДС в процентах"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-vat"
        }
      }
    },
    "/api/page_types": {
      "get": {
        "summary": "Получение списка типов страниц",
        "operationId": "list-page-types",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Главная",
                            "description": "тип страницы"
                          }
                        }
                      }
                    },
                    "pageTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-page-types"
        }
      }
    },
    "/api/page_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа страницы",
        "operationId": "get-page-type",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главная",
                          "description": "тип страницы"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-page-type"
        }
      }
    },
    "/api/integration_types": {
      "get": {
        "summary": "Получение списка типов интеграций",
        "operationId": "list-integration-types",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-integration-types"
        }
      }
    },
    "/api/integration_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа интеграции",
        "operationId": "get-integration-type",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-integration-type"
        }
      }
    },
    "/api/integrations": {
      "get": {
        "summary": "Получение списка интеграций",
        "operationId": "get_api_integrations",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-integrations"
        }
      }
    },
    "/api/integrations/{id}": {
      "get": {
        "summary": "Получение выбранной интеграции",
        "operationId": "get-integration",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-integration"
        }
      }
    },
    "/api/settings": {
      "get": {
        "summary": "Получение настроек",
        "operationId": "list-settings",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-settings"
        }
      }
    },
    "/api/settings/{id}": {
      "get": {
        "summary": "Получение выбранной настройки",
        "operationId": "get-setting",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-setting"
        }
      }
    },
    "/api/delivery_types": {
      "get": {
        "summary": "Получение списка типов доставки",
        "operationId": "list-delivery-types-erp",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-delivery-types-erp"
        }
      }
    },
    "/api/block_types": {
      "get": {
        "summary": "Получение списка типов блоков",
        "operationId": "list-block-types",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Слайдер",
                            "description": "тип блока"
                          }
                        }
                      }
                    },
                    "blockTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#list-block-types"
        }
      }
    },
    "/api/block_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа блока",
        "operationId": "get-block-type",
        "tags": [
          "Платформа / Справочники и права"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Слайдер",
                          "description": "тип блока"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Справочники/#get-block-type"
        }
      }
    },
    "/api/orders/calculator": {
      "post": {
        "summary": "Расчёт стоимости товара",
        "operationId": "calculator",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price": {
                      "type": "integer",
                      "example": 1414,
                      "description": "итоговая стоимость с учётом наценки и скидки"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#calculator"
        },
        "description": "Считает итоговую цену с учётом наценки и скидки. Не сохраняет ничего в базе.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "integer",
                    "example": 1000,
                    "description": "себестоимость товара (обязательно)"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 40,
                    "description": "наценка в процентах (обязательно, `0` если без наценки)"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 1,
                    "description": "скидка в процентах (обязательно, `0` если без скидки)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_address": {
      "post": {
        "summary": "Поиск адреса",
        "operationId": "post_api_search_address",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "г. Новосибирск, ул. Новогодняя, д. 20"
                          },
                          "value": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20"
                          }
                        }
                      }
                    },
                    "addressesCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#search-address"
        },
        "description": "Подсказки адресов для autocomplete (как DaData). Возвращает список вариантов, сопоставимых с введённой строкой.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Новогодняя 20",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_bank": {
      "post": {
        "summary": "Поиск банка",
        "operationId": "search-bank",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "banks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "ПАО Сбербанк"
                          },
                          "bik": {
                            "type": "string",
                            "example": "044525225"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "773601001"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": ""
                          },
                          "address": {
                            "type": "string",
                            "example": "117997, г. Москва, ул. Вавилова, д. 19"
                          }
                        }
                      }
                    },
                    "banksCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#search-bank"
        },
        "description": "Подсказки банковских реквизитов по БИК или названию. Возвращает шаблонные `IBankRequisite` для авто-заполнения формы.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Сбер",
                    "description": "поисковая строка (БИК или название банка)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_company": {
      "post": {
        "summary": "Поиск компании",
        "operationId": "search-company",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "2XX": {
            "description": "Успешный ответ. Точный код не зафиксирован в карточке метода.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "companies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\""
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          },
                          "orgn": {
                            "type": "string",
                            "example": "1185476049158"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич"
                          },
                          "registration_date": {
                            "type": "string",
                            "example": "2020-04-02",
                            "format": "date"
                          }
                        }
                      }
                    },
                    "companiesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#search-company"
        },
        "description": "Подсказки юрлиц по названию, ИНН или ОГРН. Используется в формах создания компании-контрагента и компании-бизнеса.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "example": "inn",
                    "description": "по какому полю искать: `\"name\"` | `\"inn\"` | `\"ogrn\"`"
                  },
                  "query": {
                    "type": "string",
                    "example": "5403057658",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_nomenclature": {
      "post": {
        "summary": "Поиск номенклатуры",
        "operationId": "search-nomenclature",
        "tags": [
          "Платформа / Калькулятор и подсказки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          }
        },
        "externalDocs": {
          "description": "Человекочитаемая карточка метода",
          "url": "https://docs.gigma.ru/ERP/Вспомогательные запросы/#search-nomenclature"
        },
        "description": "Полнотекстовый поиск по номенклатуре через DaData. Возвращает список совпадений по названию.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "крем",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "appTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Token",
        "description": "Непрозрачный App Token. Определяет Application и project context."
      },
      "bearerErpAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque",
        "description": "Непрозрачный Bearer сотрудника."
      },
      "bearerEcomAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque",
        "description": "Непрозрачный Bearer клиента. Не взаимозаменяется с ERP Bearer."
      },
      "counterpartyAuthClientBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Backend-only client_id и client_secret для token introspection."
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "errors"
        ],
        "additionalProperties": true
      },
      "LaravelPaginator": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {}
          },
          "current_page": {
            "type": "integer"
          },
          "last_page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "required": [
          "data",
          "current_page",
          "last_page",
          "per_page",
          "total"
        ]
      },
      "TablesEnvelope": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "current_page": {
                "type": "integer"
              },
              "last_page": {
                "type": "integer"
              },
              "per_page": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "from": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "to": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        },
        "required": [
          "columns",
          "pagination"
        ],
        "additionalProperties": true
      }
    },
    "responses": {
      "BadRequest": {
        "description": "400 — запрос не подходит текущему flow или состоянию.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Unauthenticated": {
        "description": "401 — отсутствует, истёк или не подходит токен.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "message": "Unauthenticated."
            }
          }
        }
      },
      "Forbidden": {
        "description": "403 — недостаточно permission, scope или token ability.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "NotFound": {
        "description": "404 — ресурс отсутствует либо скрыт project/application boundary.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Conflict": {
        "description": "409 — конфликт текущего состояния или повтор операции.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Gone": {
        "description": "410 — ресурс или сессия больше недоступны.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "415 — неверный Content-Type.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "ValidationError": {
        "description": "422 — ошибка полей или бизнес-валидации.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "RateLimited": {
        "description": "429 — endpoint-specific rate limit. Используйте Retry-After, если он присутствует.",
        "headers": {
          "Retry-After": {
            "description": "Секунд до допустимой следующей попытки.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "message": "Too Many Attempts."
            }
          }
        }
      },
      "ServerError": {
        "description": "500 — внутренняя ошибка. Результат write-операции может быть неизвестен.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "BadGateway": {
        "description": "502 — ошибка внешнего провайдера или шлюза.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "503 — сервис временно недоступен.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Сайты и приложения / Heartbeat клиентской сессии"
    },
    {
      "name": "Сайты и приложения / Проверка Bearer-токена"
    },
    {
      "name": "Сайты и приложения / Вход клиента"
    },
    {
      "name": "Сайты и приложения / Профиль клиента"
    },
    {
      "name": "Сайты и приложения / Каталог, тарифы и цены"
    },
    {
      "name": "Сайты и приложения / Заказы и подписки"
    },
    {
      "name": "Сайты и приложения / Контентные блоки"
    },
    {
      "name": "Сайты и приложения / Страницы и публикации"
    },
    {
      "name": "Сайты и приложения / Меню и навигация"
    },
    {
      "name": "Сайты и приложения / Настройки и поиск"
    },
    {
      "name": "Сайты и приложения / Уведомления клиента"
    },
    {
      "name": "Сайты и приложения / Справочники витрины"
    },
    {
      "name": "Платформа / Доступ сотрудников"
    },
    {
      "name": "Платформа / MCP: рабочие методы"
    },
    {
      "name": "Платформа / MCP: получение доступа"
    },
    {
      "name": "Платформа / Управление агентами"
    },
    {
      "name": "Платформа / Сотрудники и менеджеры"
    },
    {
      "name": "Платформа / Бизнесы и реквизиты"
    },
    {
      "name": "Платформа / Приложения и webhooks"
    },
    {
      "name": "Платформа / Каталог товаров и услуг"
    },
    {
      "name": "Платформа / Склады"
    },
    {
      "name": "Платформа / Остатки и импорт"
    },
    {
      "name": "Платформа / Резервы товаров"
    },
    {
      "name": "Платформа / Стратегии продаж"
    },
    {
      "name": "Платформа / Акции и скидки"
    },
    {
      "name": "Платформа / Магазины и пункты выдачи"
    },
    {
      "name": "Платформа / Клиенты и контрагенты"
    },
    {
      "name": "Платформа / Заказы и исполнение"
    },
    {
      "name": "Платформа / Задачи команды"
    },
    {
      "name": "Платформа / Контентные блоки"
    },
    {
      "name": "Платформа / Страницы и публикации"
    },
    {
      "name": "Платформа / Меню сотрудников"
    },
    {
      "name": "Платформа / Файлы и медиа"
    },
    {
      "name": "Платформа / Справочники и права"
    },
    {
      "name": "Платформа / Калькулятор и подсказки"
    }
  ],
  "x-gigma-review": {
    "reviewed_at": "2026-08-15",
    "backend_revision": "41c426cabfa35b2ec25106b6c8360a06836e8fb6",
    "dictionary_policy": "live endpoints only; numeric snapshots are not emitted as enum",
    "success_policy": "exact code from endpoint card, otherwise 2XX"
  }
}