{
  "openapi": "3.1.2",
  "info": {
    "title": "Публичный API СервисАпп",
    "version": "1.0.0",
    "description": "Документация API СервисАпп на 4 ноября 2026 года. Запросы GET и POST выполняются на домене организации. Версии ресурсов имеют секундную точность. Основные разрешения и права указаны у операций; дополнительные условия описаны в справочнике."
  },
  "servers": [
    {
      "url": "{organization_origin}/api/v1",
      "variables": {
        "organization_origin": {
          "default": "https://organization.example",
          "description": "Адрес поддомена вашей организации без завершающего слеша."
        }
      }
    }
  ],
  "security": [
    {
      "http": []
    }
  ],
  "paths": {
    "/acts/{id}/apply-kit": {
      "post": {
        "operationId": "v1.acts.apply-kit",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kit_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "kit_version": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,19})$"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "kit_id",
                  "kit_version"
                ]
              },
              "example": {
                "kit_id": 101,
                "kit_version": "1793782800"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Применение комплекта работ и товаров",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{id}/duplicate": {
      "post": {
        "operationId": "v1.acts.duplicate",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Копирование по обычным правилам",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/equipment": {
      "get": {
        "operationId": "v1.act-equipment.index",
        "tags": [
          "act-equipment"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-equipment-index-200"
                },
                "example": {
                  "data": [
                    {
                      "equipment": {
                        "id": 101,
                        "name": "Плановый осмотр",
                        "customer_id": 101,
                        "customer_site_id": null,
                        "equipment_model_id": null,
                        "manufacturer_id": null,
                        "device_type_id": null,
                        "model_name": null,
                        "serial_number": null,
                        "inventory_number": null,
                        "manufacture_date": null,
                        "installation_date": null,
                        "warranty_expires_at": null,
                        "catalog_product_id": null,
                        "location": null,
                        "technical_specs": null,
                        "status": "active",
                        "last_maintenance_date": null,
                        "next_maintenance_date": null,
                        "usage_reading": 1,
                        "usage_unit_id": null,
                        "maintenance_interval": null,
                        "note": null,
                        "custom_fields": [],
                        "external_id": null,
                        "links": {
                          "edit": null,
                          "portal": null,
                          "public": null
                        },
                        "version": "1793782800",
                        "updated_at": null
                      },
                      "act_product_id": null,
                      "maintenance_schedules": []
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Оборудование акта и состояние выполнения ТО",
        "x-required-scopes": [
          "acts:read",
          "equipment:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр",
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.act-equipment.store",
        "tags": [
          "act-equipment"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "existing",
                      "client_unit",
                      "sold_unit"
                    ]
                  },
                  "equipment_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "maintenance_schedule_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "expected_versions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "equipment",
                            "maintenance-schedules"
                          ]
                        },
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "version": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "maxLength": 128
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "version"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "product_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "serial_numbers": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "unit": {
                    "type": "object",
                    "properties": {
                      "equipment_model_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "manufacturer_id": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1
                      },
                      "device_type_id": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1
                      },
                      "model_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "serial_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "inventory_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "customer_site_id": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1
                      },
                      "manufacture_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      },
                      "installation_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      },
                      "warranty_expires_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      },
                      "location": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2000
                      },
                      "note": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 10000
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field_id": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string"
                                    },
                                    "currency": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "field_id",
                            "value"
                          ]
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "mode"
                ],
                "title": "Параметры добавления оборудования в акт",
                "additionalProperties": false,
                "x-conditions": "existing: equipment_ids XOR maintenance_schedule_ids + expected_versions; client_unit: unit.name; sold_unit: product_id. См. описание ресурса.",
                "oneOf": [
                  {
                    "properties": {
                      "mode": {
                        "const": "existing"
                      }
                    },
                    "required": [
                      "expected_versions"
                    ],
                    "oneOf": [
                      {
                        "required": [
                          "equipment_ids"
                        ],
                        "not": {
                          "required": [
                            "maintenance_schedule_ids"
                          ]
                        }
                      },
                      {
                        "required": [
                          "maintenance_schedule_ids"
                        ],
                        "not": {
                          "required": [
                            "equipment_ids"
                          ]
                        }
                      }
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "unit"
                          ]
                        },
                        {
                          "required": [
                            "product_id"
                          ]
                        },
                        {
                          "required": [
                            "quantity"
                          ]
                        },
                        {
                          "required": [
                            "serial_numbers"
                          ]
                        }
                      ]
                    }
                  },
                  {
                    "properties": {
                      "mode": {
                        "const": "client_unit"
                      },
                      "unit": {
                        "required": [
                          "name"
                        ]
                      }
                    },
                    "required": [
                      "unit"
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "equipment_ids"
                          ]
                        },
                        {
                          "required": [
                            "maintenance_schedule_ids"
                          ]
                        },
                        {
                          "required": [
                            "expected_versions"
                          ]
                        },
                        {
                          "required": [
                            "product_id"
                          ]
                        },
                        {
                          "required": [
                            "quantity"
                          ]
                        },
                        {
                          "required": [
                            "serial_numbers"
                          ]
                        }
                      ]
                    }
                  },
                  {
                    "properties": {
                      "mode": {
                        "const": "sold_unit"
                      },
                      "unit": {
                        "not": {
                          "required": [
                            "name"
                          ]
                        }
                      }
                    },
                    "required": [
                      "product_id"
                    ],
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "equipment_ids"
                          ]
                        },
                        {
                          "required": [
                            "maintenance_schedule_ids"
                          ]
                        },
                        {
                          "required": [
                            "expected_versions"
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              "example": {
                "mode": "existing",
                "equipment_ids": [
                  101
                ],
                "expected_versions": [
                  {
                    "type": "equipment",
                    "id": 101,
                    "version": "1793782800"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-equipment-store-200"
                },
                "example": {
                  "data": {
                    "equipment_ids": [],
                    "maintenance_schedule_ids": [],
                    "act_product_ids": []
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-equipment-store-200"
                },
                "example": {
                  "data": {
                    "equipment_ids": [],
                    "maintenance_schedule_ids": [],
                    "act_product_ids": []
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Добавление существующих или новых единиц по явному режиму",
        "x-required-scopes": [
          "acts:write",
          "equipment:read",
          "equipment:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/equipment/{equipment_id}/remove": {
      "post": {
        "operationId": "v1.act-equipment.remove",
        "tags": [
          "act-equipment"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-equipment-store-200"
                },
                "example": {
                  "data": {
                    "equipment_ids": [],
                    "maintenance_schedule_ids": [],
                    "act_product_ids": []
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление единицы из состава с проверкой последствий",
        "x-required-scopes": [
          "acts:write",
          "equipment:read",
          "equipment:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/operations": {
      "get": {
        "operationId": "v1.act-operations.index",
        "tags": [
          "act-operations"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "operation_id": 101,
                      "quantity": "1.00",
                      "unit_id": 101,
                      "unit_price": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "discount": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "note": null,
                      "assigned_user_ids": [],
                      "maintenance_schedule_id": null,
                      "equipment_id": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.act-operations.store",
        "tags": [
          "act-operations"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "unit_id": {
                    "type": "integer",
                    "enum": [
                      0,
                      12,
                      1,
                      11,
                      10,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "assigned_user_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "maintenance_schedule_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "unit_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "discount": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:discount"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:discount"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "operation_id",
                  "quantity"
                ]
              },
              "example": {
                "operation_id": 101,
                "quantity": "1.00"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "note": null,
                    "assigned_user_ids": [],
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/operations/{id}": {
      "get": {
        "operationId": "v1.act-operations.show",
        "tags": [
          "act-operations"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "note": null,
                    "assigned_user_ids": [],
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/operations/{id}/update": {
      "post": {
        "operationId": "v1.act-operations.update",
        "tags": [
          "act-operations"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "unit_id": {
                    "type": "integer",
                    "enum": [
                      0,
                      12,
                      1,
                      11,
                      10,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "assigned_user_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "maintenance_schedule_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "unit_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "discount": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:discount"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:discount"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "operation_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "note": null,
                    "assigned_user_ids": [],
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/operations/{id}/delete": {
      "post": {
        "operationId": "v1.act-operations.delete",
        "tags": [
          "act-operations"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление с проверкой зависимостей",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/products": {
      "get": {
        "operationId": "v1.act-products.index",
        "tags": [
          "act-products"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-products-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "product_id": 101,
                      "quantity": "1.00",
                      "unit_id": 101,
                      "unit_price": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "discount": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "markup_id": null,
                      "serial_number": null,
                      "note": null,
                      "maintenance_schedule_id": null,
                      "equipment_id": null,
                      "reservation_state": "пример",
                      "inventory_effect": {
                        "mode": "пример",
                        "reserved_quantity": "пример",
                        "written_off_quantity": "пример",
                        "shortage_quantity": "пример",
                        "requires_reconciliation": true
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.act-products.store",
        "tags": [
          "act-products"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "unit_id": {
                    "type": "integer",
                    "enum": [
                      0,
                      12,
                      1,
                      11,
                      10,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "markup_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "maintenance_schedule_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "unit_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "discount": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:discount"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:discount"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "product_id",
                  "quantity"
                ]
              },
              "example": {
                "product_id": 101,
                "quantity": "1.00"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "markup_id": null,
                    "serial_number": null,
                    "note": null,
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "reservation_state": "пример",
                    "inventory_effect": {
                      "mode": "пример",
                      "reserved_quantity": "пример",
                      "written_off_quantity": "пример",
                      "shortage_quantity": "пример",
                      "requires_reconciliation": true
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/products/{id}": {
      "get": {
        "operationId": "v1.act-products.show",
        "tags": [
          "act-products"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-products-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "markup_id": null,
                    "serial_number": null,
                    "note": null,
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "reservation_state": "пример",
                    "inventory_effect": {
                      "mode": "пример",
                      "reserved_quantity": "пример",
                      "written_off_quantity": "пример",
                      "shortage_quantity": "пример",
                      "requires_reconciliation": true
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/products/{id}/update": {
      "post": {
        "operationId": "v1.act-products.update",
        "tags": [
          "act-products"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "unit_id": {
                    "type": "integer",
                    "enum": [
                      0,
                      12,
                      1,
                      11,
                      10,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "markup_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "maintenance_schedule_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "unit_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:unit_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "discount": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:discount"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:discount"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "product_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "quantity": "1.00",
                    "unit_id": 101,
                    "unit_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "discount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "markup_id": null,
                    "serial_number": null,
                    "note": null,
                    "maintenance_schedule_id": null,
                    "equipment_id": null,
                    "reservation_state": "пример",
                    "inventory_effect": {
                      "mode": "пример",
                      "reserved_quantity": "пример",
                      "written_off_quantity": "пример",
                      "shortage_quantity": "пример",
                      "requires_reconciliation": true
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/products/{id}/delete": {
      "post": {
        "operationId": "v1.act-products.delete",
        "tags": [
          "act-products"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление с проверкой зависимостей",
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/media": {
      "get": {
        "operationId": "v1.act-media.index",
        "summary": "Метаданные вложений акта; подпись согласования не входит в ресурс",
        "tags": [
          "act-media"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "filter[kind]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "attachment",
              "enum": [
                "attachment"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "act_id": 101,
                      "kind": "attachment",
                      "filename": "attachment.txt",
                      "mime_type": "text/plain",
                      "size": 1,
                      "created_at": null,
                      "version": "1793782800",
                      "download_url": "https://organization.example/"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "act_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.act-media.store",
        "summary": "Добавление одного вложения. Разделитель частей multipart/form-data не влияет на повтор запроса",
        "tags": [
          "act-media"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "attachment",
                    "enum": [
                      "attachment"
                    ]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Файл от 1 до 10 МиБ включительно; MIME проверяется по содержимому."
                  },
                  "client_filename": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "kind",
                  "file"
                ]
              },
              "example": {
                "kind": "attachment",
                "file": "FILE_BYTES"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "act_id": 101,
                    "kind": "attachment",
                    "filename": "attachment.txt",
                    "mime_type": "text/plain",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "act_media:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Системные настройки → Загрузка вложений"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/media/{id}": {
      "get": {
        "operationId": "v1.act-media.show",
        "summary": "Карточка файла с самостоятельной секундной версией и ETag представления",
        "tags": [
          "act-media"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "act_id": 101,
                    "kind": "attachment",
                    "filename": "attachment.txt",
                    "mime_type": "text/plain",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "act_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/media/{id}/download": {
      "get": {
        "operationId": "v1.act-media.download",
        "summary": "Защищённое скачивание. В v1 Range не поддерживается",
        "tags": [
          "act-media"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "act_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{act_id}/media/{id}/delete": {
      "post": {
        "operationId": "v1.act-media.destroy",
        "summary": "Удаление проверяет версию метаданных файла, а не версию акта",
        "tags": [
          "act-media"
        ],
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "act_media:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts": {
      "get": {
        "operationId": "v1.acts.index",
        "summary": "Акты доступных мастерских с фильтрами и пагинацией по курсору",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "filter[type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Тип акта: ремонт, монтаж или техническое обслуживание.",
              "enum": [
                "repair",
                "installation",
                "maintenance"
              ]
            }
          },
          {
            "name": "filter[number]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[manager_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[technician_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[external_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "filter[created_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[created_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "number": "пример",
                      "type": "repair",
                      "customer_id": 101,
                      "workshop_id": 101,
                      "stock_id": null,
                      "manager_id": null,
                      "technician_id": null,
                      "status_id": 101,
                      "device_type_id": null,
                      "manufacturer_id": null,
                      "model_name": null,
                      "serial_number": null,
                      "appearance": null,
                      "customer_note": null,
                      "is_warranty_case": true,
                      "previous_act_id": null,
                      "project_id": null,
                      "service_contract_id": null,
                      "defect_ids": [],
                      "device_part_ids": [],
                      "custom_fields": [],
                      "external_id": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.acts.store",
        "summary": "Создание открытого акта ремонта, монтажа или ТО",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Ключ команды подключения, 1–128 символов A–Z/a–z/0–9/._:-.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Тип акта: ремонт, монтаж или техническое обслуживание.",
                    "enum": [
                      "repair",
                      "installation",
                      "maintenance"
                    ]
                  },
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "stock_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "manager_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "technician_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "status_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "model_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "appearance": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "customer_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "internal_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "result": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "previous_act_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "project_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defect_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "device_part_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "type",
                  "customer_id",
                  "workshop_id"
                ]
              },
              "example": {
                "type": "repair",
                "customer_id": 101,
                "workshop_id": 101
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{id}": {
      "get": {
        "operationId": "v1.acts.show",
        "summary": "Карточка акта, включая служебную заметку и результат работ",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "description": "ETag представления из предыдущего GET.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{id}/update": {
      "post": {
        "operationId": "v1.acts.update",
        "summary": "Изменить разрешённые поля акта, сохраняя отсутствующие значения",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Ключ команды подключения, 1–128 символов A–Z/a–z/0–9/._:-.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version акта: Unix-секунды updated_at; для null — \"0\".",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "stock_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "manager_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "technician_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "model_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "appearance": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "customer_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "internal_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "result": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "previous_act_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "project_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defect_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "device_part_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "customer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{id}/status": {
      "post": {
        "operationId": "v1.acts.status",
        "summary": "Смена статуса акта с согласованным обновлением склада, гарантий и обслуживания",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Ключ команды подключения, 1–128 символов A–Z/a–z/0–9/._:-.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version акта: Unix-секунды updated_at; для null — \"0\".",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status_id"
                ]
              },
              "example": {
                "status_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/acts/{id}/delete": {
      "post": {
        "operationId": "v1.acts.destroy",
        "summary": "Удаление акта без зависимостей; повтор возвращает сохранённый результат с признаком удаления",
        "tags": [
          "acts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Ключ команды подключения, 1–128 символов A–Z/a–z/0–9/._:-.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version акта: Unix-секунды updated_at; для null — \"0\".",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "acts:delete"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/api-operations": {
      "get": {
        "operationId": "v1.operations.index",
        "tags": [
          "api-operations"
        ],
        "parameters": [
          {
            "name": "filter[state]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "processing",
                "succeeded",
                "failed",
                "needs_reconciliation"
              ]
            }
          },
          {
            "name": "filter[created_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[created_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-operations-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                      "state": "processing",
                      "method": "POST",
                      "path": "/api/v1/customers",
                      "created_at": null,
                      "completed_at": null,
                      "resource_refs": [
                        {
                          "type": "customers",
                          "id": 101
                        }
                      ],
                      "error": null,
                      "response_available": false,
                      "http_status": null,
                      "response": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z",
                    "period": {
                      "created_from": "пример",
                      "created_to": "пример"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Ограниченный журнал операций текущего подключения",
        "x-required-scopes": [
          "api_operations:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/api-operations/{id}": {
      "get": {
        "operationId": "v1.operations.show",
        "tags": [
          "api-operations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-operations-show-200"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "method": "POST",
                    "path": "/api/v1/customers",
                    "created_at": null,
                    "completed_at": null,
                    "resource_refs": [
                      {
                        "type": "customers",
                        "id": 101
                      }
                    ],
                    "error": null,
                    "response_available": false,
                    "http_status": null,
                    "response": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Исход операции, её ресурсы и состояние",
        "x-required-scopes": [
          "api_operations:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/operations": {
      "post": {
        "operationId": "v1.catalog-operations.store",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "pricing_type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "hourly"
                    ]
                  },
                  "labor_hours": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,2})?$"
                  },
                  "workshop_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "estimated_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 525600
                  },
                  "tax": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "warranty": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "fixed_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:fixed_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:fixed_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "pricing_type"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "pricing_type": "fixed",
                "fixed_price": {
                  "amount": "500.00",
                  "currency": "RUB"
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "pricing_type": "fixed",
                    "fixed_price": null,
                    "labor_hours": null,
                    "hourly_rate": null,
                    "calculated_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "workshop_id": null,
                    "category_id": null,
                    "estimated_minutes": null,
                    "tax": null,
                    "warranty": null,
                    "description": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "operations:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "get": {
        "operationId": "v1.catalog-operations.index",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[category_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[pricing_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "fixed",
                "hourly"
              ]
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "pricing_type": "fixed",
                      "fixed_price": null,
                      "labor_hours": null,
                      "hourly_rate": null,
                      "calculated_price": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "workshop_id": null,
                      "category_id": null,
                      "estimated_minutes": null,
                      "tax": null,
                      "warranty": null,
                      "description": null,
                      "archived": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "operations:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/operations/{id}/update": {
      "post": {
        "operationId": "v1.catalog-operations.update",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "pricing_type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "hourly"
                    ]
                  },
                  "labor_hours": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,2})?$"
                  },
                  "workshop_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "estimated_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 525600
                  },
                  "tax": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "warranty": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "fixed_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:fixed_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:fixed_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "pricing_type": "fixed",
                    "fixed_price": null,
                    "labor_hours": null,
                    "hourly_rate": null,
                    "calculated_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "workshop_id": null,
                    "category_id": null,
                    "estimated_minutes": null,
                    "tax": null,
                    "warranty": null,
                    "description": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "operations:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/operations/{id}/archive": {
      "post": {
        "operationId": "v1.catalog-operations.archive",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "pricing_type": "fixed",
                    "fixed_price": null,
                    "labor_hours": null,
                    "hourly_rate": null,
                    "calculated_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "workshop_id": null,
                    "category_id": null,
                    "estimated_minutes": null,
                    "tax": null,
                    "warranty": null,
                    "description": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация",
        "x-required-scopes": [
          "operations:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/operations/{id}/restore": {
      "post": {
        "operationId": "v1.catalog-operations.restore",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "pricing_type": "fixed",
                    "fixed_price": null,
                    "labor_hours": null,
                    "hourly_rate": null,
                    "calculated_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "workshop_id": null,
                    "category_id": null,
                    "estimated_minutes": null,
                    "tax": null,
                    "warranty": null,
                    "description": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Возврат работы из архива",
        "x-required-scopes": [
          "operations:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/operations/{id}": {
      "get": {
        "operationId": "v1.catalog-operations.show",
        "tags": [
          "operations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-operations-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "pricing_type": "fixed",
                    "fixed_price": null,
                    "labor_hours": null,
                    "hourly_rate": null,
                    "calculated_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "workshop_id": null,
                    "category_id": null,
                    "estimated_minutes": null,
                    "tax": null,
                    "warranty": null,
                    "description": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "operations:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/products": {
      "post": {
        "operationId": "v1.catalog-products.store",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "sku": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacturer_sku": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "barcode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "warranty": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "product_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "barcode_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "enum": [
                      13,
                      null
                    ]
                  },
                  "tax": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "discontinued": {
                    "type": "boolean"
                  },
                  "is_serial_tracked": {
                    "type": "boolean"
                  },
                  "requires_marking": {
                    "type": "boolean"
                  },
                  "asset_tracking_type": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ProductAssetType"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "enum": [
                      "equipment",
                      "component",
                      "license",
                      "certificate",
                      null
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "properties": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "property_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "property_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "sale_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:sale_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:sale_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "purchase_price": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:purchase_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:purchase_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "sale_price"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "sale_price": {
                  "amount": "1.00",
                  "currency": "RUB"
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "sku": null,
                    "manufacturer_sku": null,
                    "barcode": null,
                    "barcode_type_id": null,
                    "manufacturer_id": null,
                    "product_type_id": null,
                    "category_id": null,
                    "sale_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "description": null,
                    "warranty": null,
                    "tax": null,
                    "discontinued": true,
                    "is_serial_tracked": true,
                    "requires_marking": true,
                    "asset_tracking_type": null,
                    "properties": [],
                    "external_id": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "products:write"
        ],
        "x-required-permissions": [
          "Товары → Изменение",
          "Товары → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "get": {
        "operationId": "v1.products.index",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[sku]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[barcode]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[manufacturer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[product_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[category_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[external_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-products-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "sku": null,
                      "manufacturer_sku": null,
                      "barcode": null,
                      "barcode_type_id": null,
                      "manufacturer_id": null,
                      "product_type_id": null,
                      "category_id": null,
                      "sale_price": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "description": null,
                      "warranty": null,
                      "tax": null,
                      "discontinued": true,
                      "is_serial_tracked": true,
                      "requires_marking": true,
                      "asset_tracking_type": null,
                      "properties": [],
                      "external_id": null,
                      "archived": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "products:read"
        ],
        "x-required-permissions": [
          "Товары → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/products/{id}/update": {
      "post": {
        "operationId": "v1.catalog-products.update",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "sku": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacturer_sku": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "barcode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "warranty": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "product_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "barcode_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "enum": [
                      13,
                      null
                    ]
                  },
                  "tax": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "discontinued": {
                    "type": "boolean"
                  },
                  "is_serial_tracked": {
                    "type": "boolean"
                  },
                  "requires_marking": {
                    "type": "boolean"
                  },
                  "asset_tracking_type": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ProductAssetType"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "enum": [
                      "equipment",
                      "component",
                      "license",
                      "certificate",
                      null
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "properties": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "property_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "property_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "sale_price": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:sale_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:sale_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "purchase_price": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:purchase_price"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:purchase_price"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "sku": null,
                    "manufacturer_sku": null,
                    "barcode": null,
                    "barcode_type_id": null,
                    "manufacturer_id": null,
                    "product_type_id": null,
                    "category_id": null,
                    "sale_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "description": null,
                    "warranty": null,
                    "tax": null,
                    "discontinued": true,
                    "is_serial_tracked": true,
                    "requires_marking": true,
                    "asset_tracking_type": null,
                    "properties": [],
                    "external_id": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "products:write"
        ],
        "x-required-permissions": [
          "Товары → Изменение",
          "Товары → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/products/{id}/archive": {
      "post": {
        "operationId": "v1.catalog-products.archive",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "sku": null,
                    "manufacturer_sku": null,
                    "barcode": null,
                    "barcode_type_id": null,
                    "manufacturer_id": null,
                    "product_type_id": null,
                    "category_id": null,
                    "sale_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "description": null,
                    "warranty": null,
                    "tax": null,
                    "discontinued": true,
                    "is_serial_tracked": true,
                    "requires_marking": true,
                    "asset_tracking_type": null,
                    "properties": [],
                    "external_id": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация",
        "x-required-scopes": [
          "products:write"
        ],
        "x-required-permissions": [
          "Товары → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/products/{id}/restore": {
      "post": {
        "operationId": "v1.catalog-products.restore",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-catalog-products-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "sku": null,
                    "manufacturer_sku": null,
                    "barcode": null,
                    "barcode_type_id": null,
                    "manufacturer_id": null,
                    "product_type_id": null,
                    "category_id": null,
                    "sale_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "description": null,
                    "warranty": null,
                    "tax": null,
                    "discontinued": true,
                    "is_serial_tracked": true,
                    "requires_marking": true,
                    "asset_tracking_type": null,
                    "properties": [],
                    "external_id": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Возврат товара из архива",
        "x-required-scopes": [
          "products:write"
        ],
        "x-required-permissions": [
          "Товары → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "v1.products.show",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-products-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "sku": null,
                    "manufacturer_sku": null,
                    "barcode": null,
                    "barcode_type_id": null,
                    "manufacturer_id": null,
                    "product_type_id": null,
                    "category_id": null,
                    "sale_price": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "description": null,
                    "warranty": null,
                    "tax": null,
                    "discontinued": true,
                    "is_serial_tracked": true,
                    "requires_marking": true,
                    "asset_tracking_type": null,
                    "properties": [],
                    "external_id": null,
                    "archived": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "products:read"
        ],
        "x-required-permissions": [
          "Товары → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/categories": {
      "get": {
        "operationId": "v1.reference.categories.index",
        "tags": [
          "categories"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[parent_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.categories.store",
        "tags": [
          "categories"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "parent_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/categories/{id}": {
      "get": {
        "operationId": "v1.reference.categories.show",
        "tags": [
          "categories"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/product-types": {
      "get": {
        "operationId": "v1.reference.product-types.index",
        "tags": [
          "product-types"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[device_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.product-types.store",
        "tags": [
          "product-types"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/product-types/{id}": {
      "get": {
        "operationId": "v1.reference.product-types.show",
        "tags": [
          "product-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/properties": {
      "get": {
        "operationId": "v1.reference.properties.index",
        "tags": [
          "properties"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[product_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.properties.store",
        "tags": [
          "properties"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "product_type_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "product_type_id"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "product_type_id": 101
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/properties/{id}": {
      "get": {
        "operationId": "v1.reference.properties.show",
        "tags": [
          "properties"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/vendors": {
      "get": {
        "operationId": "v1.reference.vendors.index",
        "tags": [
          "vendors"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.vendors.store",
        "tags": [
          "vendors"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "maxLength": 2048
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/vendors/{id}": {
      "get": {
        "operationId": "v1.reference.vendors.show",
        "tags": [
          "vendors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits": {
      "get": {
        "operationId": "v1.service-kits.index",
        "tags": [
          "service-kits"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kits-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "description": null,
                      "is_active": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "service_kits:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.service-kits.store",
        "tags": [
          "service-kits"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "description": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{id}": {
      "get": {
        "operationId": "v1.service-kits.show",
        "tags": [
          "service-kits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kits-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "description": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "service_kits:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{id}/update": {
      "post": {
        "operationId": "v1.service-kits.update",
        "tags": [
          "service-kits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "description": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{id}/archive": {
      "post": {
        "operationId": "v1.service-kits.archive",
        "tags": [
          "service-kits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "description": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{kit_id}/items": {
      "get": {
        "operationId": "v1.service-kit-items.index",
        "tags": [
          "service-kit-items"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kit-items-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "operation_id": null,
                      "product_id": null,
                      "quantity": "1.00",
                      "sort_order": 1,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "service_kits:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.service-kit-items.store",
        "tags": [
          "service-kit-items"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "additionalProperties": false,
                "required": [
                  "quantity"
                ]
              },
              "example": {
                "quantity": "1.00",
                "operation_id": 101
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kit-items-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "product_id": null,
                    "quantity": "1.00",
                    "sort_order": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{kit_id}/items/{id}": {
      "get": {
        "operationId": "v1.service-kit-items.show",
        "tags": [
          "service-kit-items"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kit-items-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "product_id": null,
                    "quantity": "1.00",
                    "sort_order": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "service_kits:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{kit_id}/items/{id}/update": {
      "post": {
        "operationId": "v1.service-kit-items.update",
        "tags": [
          "service-kit-items"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "product_id": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-kit-items-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "product_id": null,
                    "quantity": "1.00",
                    "sort_order": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение",
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-kits/{kit_id}/items/{id}/delete": {
      "post": {
        "operationId": "v1.service-kit-items.delete",
        "tags": [
          "service-kit-items"
        ],
        "parameters": [
          {
            "name": "kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление с проверкой зависимостей",
        "x-required-scopes": [
          "service_kits:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/stocks": {
      "get": {
        "operationId": "v1.stocks.index",
        "tags": [
          "stocks"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[assigned_user_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-stocks-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "workshop_id": null,
                      "assigned_user_id": null,
                      "is_active": true,
                      "is_default": true,
                      "description": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список доступных складов",
        "x-required-scopes": [
          "stocks:read"
        ],
        "x-required-permissions": [
          "Остатки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/stocks/{id}": {
      "get": {
        "operationId": "v1.stocks.show",
        "tags": [
          "stocks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-stocks-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "workshop_id": null,
                    "assigned_user_id": null,
                    "is_active": true,
                    "is_default": true,
                    "description": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка склада",
        "x-required-scopes": [
          "stocks:read"
        ],
        "x-required-permissions": [
          "Остатки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/stocks/{stock_id}/levels": {
      "get": {
        "operationId": "v1.stock-levels.index",
        "tags": [
          "stock-levels"
        ],
        "parameters": [
          {
            "name": "stock_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "product_id",
                "-product_id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[product_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-stock-levels-index-200"
                },
                "example": {
                  "data": [
                    {
                      "stock_id": 101,
                      "product_id": 101,
                      "quantity": "1.00",
                      "reserved": "1.00",
                      "available": "1.00",
                      "unit_id": 101
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Позиции и доступность склада",
        "x-required-scopes": [
          "stock_levels:read"
        ],
        "x-required-permissions": [
          "Остатки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/stocks/{stock_id}/levels/{product_id}": {
      "get": {
        "operationId": "v1.stock-levels.show",
        "tags": [
          "stock-levels"
        ],
        "parameters": [
          {
            "name": "stock_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-stock-levels-show-200"
                },
                "example": {
                  "data": {
                    "stock_id": 101,
                    "product_id": 101,
                    "quantity": "1.00",
                    "reserved": "1.00",
                    "available": "1.00",
                    "unit_id": 101
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Остаток конкретного товара",
        "x-required-scopes": [
          "stock_levels:read"
        ],
        "x-required-permissions": [
          "Остатки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{parentId}/checklist-items": {
      "get": {
        "operationId": "v1.equipment-checklists.index",
        "tags": [
          "equipment-checklists"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[operation_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[is_required]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "operation_id": null,
                      "description": null,
                      "sort_order": 1,
                      "is_required": true,
                      "is_active": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "equipment_checklists:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment-checklists.create",
        "tags": [
          "equipment-checklists"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "description": "Проверить герметичность",
                "is_required": true
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "equipment_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{parentId}/checklist-items/{id}": {
      "get": {
        "operationId": "v1.equipment-checklists.show",
        "tags": [
          "equipment-checklists"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "equipment_checklists:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{parentId}/checklist-items/{id}/update": {
      "post": {
        "operationId": "v1.equipment-checklists.update",
        "tags": [
          "equipment-checklists"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "description": "Проверить герметичность",
                "is_required": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "equipment_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{parentId}/checklist-items/{id}/delete": {
      "post": {
        "operationId": "v1.equipment-checklists.delete",
        "tags": [
          "equipment-checklists"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация или удаление с проверкой зависимостей",
        "x-required-scopes": [
          "equipment_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{parentId}/checklist-items": {
      "get": {
        "operationId": "v1.scenario-checklist-items.index",
        "tags": [
          "scenario-checklist-items"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[operation_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[is_required]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "operation_id": null,
                      "description": null,
                      "sort_order": 1,
                      "is_required": true,
                      "is_active": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "maintenance_scenarios:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.scenario-checklist-items.create",
        "tags": [
          "scenario-checklist-items"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "description": "Проверить герметичность",
                "is_required": true
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{parentId}/checklist-items/{id}": {
      "get": {
        "operationId": "v1.scenario-checklist-items.show",
        "tags": [
          "scenario-checklist-items"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "maintenance_scenarios:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{parentId}/checklist-items/{id}/update": {
      "post": {
        "operationId": "v1.scenario-checklist-items.update",
        "tags": [
          "scenario-checklist-items"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "description": "Проверить герметичность",
                "is_required": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{parentId}/checklist-items/{id}/delete": {
      "post": {
        "operationId": "v1.scenario-checklist-items.delete",
        "tags": [
          "scenario-checklist-items"
        ],
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-checklists-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "operation_id": null,
                    "description": null,
                    "sort_order": 1,
                    "is_required": true,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация или удаление с проверкой зависимостей",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/context": {
      "get": {
        "operationId": "v1.context",
        "tags": [
          "context"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-context-200"
                },
                "example": {
                  "data": {
                    "organization_id": "пример",
                    "user_id": 101,
                    "client_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "scopes": [],
                    "workshop_ids": [],
                    "features": {},
                    "api_version": "1793782800",
                    "timezone": "Europe/Moscow",
                    "currency": "RUB",
                    "locale": "ru",
                    "access": {
                      "status": "active",
                      "trial_ends_at": null,
                      "subscription_ends_at": null
                    }
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Организация, сотрудник и возможности текущего подключения",
        "x-required-scopes": [],
        "x-required-permissions": [],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields": {
      "get": {
        "operationId": "v1.custom-fields.index",
        "tags": [
          "custom-fields"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[entity]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "act",
                "customer",
                "equipment",
                "visit",
                "maintenance_schedule"
              ]
            }
          },
          {
            "name": "filter[scenario_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-fields-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "code": "demo_inspection",
                      "entity": "act",
                      "scenario_id": null,
                      "type": "text",
                      "is_required": true,
                      "is_active": true,
                      "show_in_table": true,
                      "is_searchable": true,
                      "sort_order": 1,
                      "section": null,
                      "settings": {},
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Разрешённые определения полей по сущности/сценарию",
        "x-required-scopes": [
          "custom_fields:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.custom-fields.create",
        "tags": [
          "custom-fields"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "maxLength": 191,
                    "not": {
                      "enum": [
                        "today",
                        "state",
                        "equipment",
                        "customer",
                        "days_since_last_maintenance"
                      ]
                    }
                  },
                  "entity": {
                    "type": "string",
                    "enum": [
                      "act",
                      "customer",
                      "equipment",
                      "visit",
                      "maintenance_schedule"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "richtext",
                      "number",
                      "money",
                      "phone",
                      "select",
                      "multiselect",
                      "date",
                      "datetime",
                      "toggle",
                      "url",
                      "email",
                      "radio",
                      "checkbox_list"
                    ]
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "show_in_table": {
                    "type": "boolean"
                  },
                  "is_searchable": {
                    "type": "boolean"
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "section": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "settings": {
                    "type": "object",
                    "items": {
                      "type": "string"
                    },
                    "properties": {
                      "min": {
                        "type": "string"
                      },
                      "max": {
                        "type": "string"
                      },
                      "step": {
                        "type": "string"
                      },
                      "rows": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "code",
                  "entity",
                  "type"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "code": "demo_inspection",
                "entity": "act",
                "type": "text"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-fields-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "code": "demo_inspection",
                    "entity": "act",
                    "scenario_id": null,
                    "type": "text",
                    "is_required": true,
                    "is_active": true,
                    "show_in_table": true,
                    "is_searchable": true,
                    "sort_order": 1,
                    "section": null,
                    "settings": {},
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание поля",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{id}": {
      "get": {
        "operationId": "v1.custom-fields.show",
        "tags": [
          "custom-fields"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-fields-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "code": "demo_inspection",
                    "entity": "act",
                    "scenario_id": null,
                    "type": "text",
                    "is_required": true,
                    "is_active": true,
                    "show_in_table": true,
                    "is_searchable": true,
                    "sort_order": 1,
                    "section": null,
                    "settings": {},
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Одно определение",
        "x-required-scopes": [
          "custom_fields:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{field_id}/options": {
      "get": {
        "operationId": "v1.custom-field-options.index",
        "tags": [
          "custom-field-options"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-field-options-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "value": "1.00",
                      "label": "пример",
                      "color": null,
                      "sort_order": 1,
                      "is_active": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Варианты выбранного поля",
        "x-required-scopes": [
          "custom_fields:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.custom-field-options.create",
        "tags": [
          "custom-field-options"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "label",
                  "value"
                ]
              },
              "example": {
                "label": "пример",
                "value": "1.00"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-field-options-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "value": "1.00",
                    "label": "пример",
                    "color": null,
                    "sort_order": 1,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание варианта",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{field_id}/options/{id}": {
      "get": {
        "operationId": "v1.custom-field-options.show",
        "tags": [
          "custom-field-options"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-field-options-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "value": "1.00",
                    "label": "пример",
                    "color": null,
                    "sort_order": 1,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Вариант",
        "x-required-scopes": [
          "custom_fields:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{id}/update": {
      "post": {
        "operationId": "v1.custom-fields.update",
        "tags": [
          "custom-fields"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "maxLength": 191,
                    "not": {
                      "enum": [
                        "today",
                        "state",
                        "equipment",
                        "customer",
                        "days_since_last_maintenance"
                      ]
                    }
                  },
                  "is_required": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "show_in_table": {
                    "type": "boolean"
                  },
                  "is_searchable": {
                    "type": "boolean"
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "section": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "settings": {
                    "type": "object",
                    "items": {
                      "type": "string"
                    },
                    "properties": {
                      "min": {
                        "type": "string"
                      },
                      "max": {
                        "type": "string"
                      },
                      "step": {
                        "type": "string"
                      },
                      "rows": {
                        "type": "integer"
                      }
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-fields-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "code": "demo_inspection",
                    "entity": "act",
                    "scenario_id": null,
                    "type": "text",
                    "is_required": true,
                    "is_active": true,
                    "show_in_table": true,
                    "is_searchable": true,
                    "sort_order": 1,
                    "section": null,
                    "settings": {},
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых настроек",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{id}/archive": {
      "post": {
        "operationId": "v1.custom-fields.archive",
        "tags": [
          "custom-fields"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-fields-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "code": "demo_inspection",
                    "entity": "act",
                    "scenario_id": null,
                    "type": "text",
                    "is_required": true,
                    "is_active": true,
                    "show_in_table": true,
                    "is_searchable": true,
                    "sort_order": 1,
                    "section": null,
                    "settings": {},
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Отключение поля без удаления истории",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{field_id}/options/{id}/update": {
      "post": {
        "operationId": "v1.custom-field-options.update",
        "tags": [
          "custom-field-options"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "label": "пример"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-field-options-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "value": "1.00",
                    "label": "пример",
                    "color": null,
                    "sort_order": 1,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение представления",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/custom-fields/{field_id}/options/{id}/archive": {
      "post": {
        "operationId": "v1.custom-field-options.archive",
        "tags": [
          "custom-field-options"
        ],
        "parameters": [
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-custom-field-options-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "value": "1.00",
                    "label": "пример",
                    "color": null,
                    "sort_order": 1,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Отключение варианта",
        "x-required-scopes": [
          "custom_fields:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customer-sites": {
      "post": {
        "operationId": "v1.customer-sites.store",
        "tags": [
          "customer-sites"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90.0,
                    "maximum": 90.0
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180.0,
                    "maximum": 180.0
                  },
                  "contact_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "customer_id",
                  "name"
                ]
              },
              "example": {
                "customer_id": 101,
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customer-sites-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "customer_id": 101,
                    "name": "Плановый осмотр",
                    "code": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "contact_name": null,
                    "phone": null,
                    "email": null,
                    "note": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "customer_sites:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "get": {
        "operationId": "v1.customer-sites.index",
        "tags": [
          "customer-sites"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customer-sites-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "customer_id": 101,
                      "name": "Плановый осмотр",
                      "code": null,
                      "address": null,
                      "latitude": null,
                      "longitude": null,
                      "contact_name": null,
                      "phone": null,
                      "email": null,
                      "note": null,
                      "is_active": true,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "customer_sites:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customer-sites/{id}/update": {
      "post": {
        "operationId": "v1.customer-sites.update",
        "tags": [
          "customer-sites"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90.0,
                    "maximum": 90.0
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180.0,
                    "maximum": 180.0
                  },
                  "contact_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "customer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customer-sites-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "customer_id": 101,
                    "name": "Плановый осмотр",
                    "code": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "contact_name": null,
                    "phone": null,
                    "email": null,
                    "note": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "customer_sites:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customer-sites/{id}/archive": {
      "post": {
        "operationId": "v1.customer-sites.archive",
        "tags": [
          "customer-sites"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customer-sites-archive-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "archived": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация",
        "x-required-scopes": [
          "customer_sites:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customers": {
      "get": {
        "operationId": "v1.customers.index",
        "summary": "Доступные клиенты; deleted=true требует одновременно права чтения и удаления",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[external_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[phone]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[email]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[inn]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[is_customer]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[is_supplier]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$"
            }
          },
          {
            "name": "filter[deleted]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customers-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": null,
                      "company_name": null,
                      "is_customer": true,
                      "is_supplier": true,
                      "phone": null,
                      "additional_phone": null,
                      "email": null,
                      "address": null,
                      "source": null,
                      "contacts": [],
                      "custom_fields": [],
                      "external_id": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.customers.store",
        "summary": "Создание клиента с проверкой текущих прав при повторном запросе",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Уникальный ключ команды внутри подключения, 1–128 символов A–Z/a–z/0–9/._:-.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "company_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "additional_phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "inn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "kpp": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "ogrn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "internal_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_customer": {
                    "type": "boolean"
                  },
                  "is_supplier": {
                    "type": "boolean"
                  },
                  "bank": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "bik": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "account": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "correspondent_account": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": false
                  },
                  "contacts": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "phone": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "position": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 40
                        }
                      },
                      "required": [
                        "name",
                        "phone"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "phone"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "phone": "+79990000001"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customers-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "company_name": null,
                    "is_customer": true,
                    "is_supplier": true,
                    "phone": null,
                    "additional_phone": null,
                    "email": null,
                    "address": null,
                    "source": null,
                    "contacts": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customers/{id}": {
      "get": {
        "operationId": "v1.customers.show",
        "summary": "Карточка клиента, включая реквизиты и внутреннюю заметку",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "description": "Сильный ETag представления из предыдущего GET.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[deleted]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customers-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "company_name": null,
                    "is_customer": true,
                    "is_supplier": true,
                    "phone": null,
                    "additional_phone": null,
                    "email": null,
                    "address": null,
                    "source": null,
                    "contacts": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customers/{id}/update": {
      "post": {
        "operationId": "v1.customers.update",
        "summary": "Изменить разрешённые поля. Отсутствующие ключи сохраняются; повтор проверяет текущий тариф",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version прочитанного клиента: Unix-секунды updated_at, для старого null — \"0\".",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "company_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "additional_phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "inn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "kpp": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "ogrn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "internal_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_customer": {
                    "type": "boolean"
                  },
                  "is_supplier": {
                    "type": "boolean"
                  },
                  "bank": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "bik": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "account": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "correspondent_account": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": false
                  },
                  "contacts": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "phone": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "position": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 40
                        }
                      },
                      "required": [
                        "name",
                        "phone"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customers-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "company_name": null,
                    "is_customer": true,
                    "is_supplier": true,
                    "phone": null,
                    "additional_phone": null,
                    "email": null,
                    "address": null,
                    "source": null,
                    "contacts": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customers/{id}/delete": {
      "post": {
        "operationId": "v1.customers.delete",
        "summary": "Удаление клиента с проверкой связанных записей и сохранением истории. Тело запроса — {}",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version неудалённого клиента.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:delete"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customers/{id}/restore": {
      "post": {
        "operationId": "v1.customers.restore",
        "summary": "Восстановить удалённого клиента. Версия берётся из GET с filter[deleted]=true; тело запроса — {}",
        "tags": [
          "customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "data.version удалённого клиента.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customers-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "company_name": null,
                    "is_customer": true,
                    "is_supplier": true,
                    "phone": null,
                    "additional_phone": null,
                    "email": null,
                    "address": null,
                    "source": null,
                    "contacts": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "customers:delete"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits": {
      "get": {
        "operationId": "v1.visits.index",
        "summary": "Выезды доступных актов; чтение не запускает расчёт маршрута или уведомления",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "filter[act_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_site_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[crew_user_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[act_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Тип акта: ремонт, монтаж или техническое обслуживание.",
              "enum": [
                "repair",
                "installation",
                "maintenance"
              ]
            }
          },
          {
            "name": "filter[starts_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[starts_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "maxLength": 64
            }
          },
          {
            "name": "filter[scheduled]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[completed]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "number": "пример",
                      "act_id": 101,
                      "customer_id": 101,
                      "workshop_id": 101,
                      "customer_site_id": null,
                      "starts_at": null,
                      "ends_at": null,
                      "crew_user_ids": [],
                      "client_window_start_at": null,
                      "client_window_end_at": null,
                      "planning_duration_minutes": null,
                      "duration_minutes": null,
                      "address": null,
                      "latitude": null,
                      "longitude": null,
                      "note": null,
                      "state": "planned",
                      "custom_fields": [],
                      "version": "1793782800"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "visits:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.visits.store",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "planning_duration_minutes": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 10080
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90.0,
                    "maximum": 90.0
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180.0,
                    "maximum": 180.0
                  },
                  "client_window_start_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "client_window_end_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "act_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "act_version": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "maxLength": 128
                  }
                },
                "additionalProperties": false,
                "required": [
                  "act_id",
                  "act_version"
                ]
              },
              "example": {
                "act_id": 101,
                "act_version": "1793782800"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Создание для доступного act_id",
        "x-required-scopes": [
          "visits:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}": {
      "get": {
        "operationId": "v1.visits.show",
        "summary": "Карточка выезда с расписанием, бригадой и проекцией состояния акта",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-required-scopes": [
          "visits:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/history": {
      "get": {
        "operationId": "v1.equipment.history",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "filter[kind]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "maintenance-schedules",
                "acts"
              ],
              "default": "maintenance-schedules"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1.0,
              "maximum": 100.0
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-history-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "number": "пример",
                      "type": "repair",
                      "customer_id": 101,
                      "workshop_id": 101,
                      "stock_id": null,
                      "manager_id": null,
                      "technician_id": null,
                      "status_id": 101,
                      "device_type_id": null,
                      "manufacturer_id": null,
                      "model_name": null,
                      "serial_number": null,
                      "appearance": null,
                      "customer_note": null,
                      "is_warranty_case": true,
                      "previous_act_id": null,
                      "project_id": null,
                      "service_contract_id": null,
                      "defect_ids": [],
                      "device_part_ids": [],
                      "custom_fields": [],
                      "external_id": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "История обслуживания и связанных актов",
        "x-required-scopes": [
          "equipment:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/usage": {
      "get": {
        "operationId": "v1.equipment.usage.show",
        "tags": [
          "equipment-usage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-usage-show-200"
                },
                "example": {
                  "data": {
                    "reading": 1,
                    "usage_unit_id": null,
                    "last_service_reading": 1,
                    "maintenance_interval": null,
                    "remaining_until_maintenance": null,
                    "plans": []
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Текущие показания, единица и порог обслуживания",
        "x-required-scopes": [
          "equipment_usage:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment.usage.store",
        "tags": [
          "equipment-usage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reading": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9223372036854775807
                  },
                  "usage_unit_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "reading",
                  "usage_unit_id"
                ]
              },
              "example": {
                "reading": 1,
                "usage_unit_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-usage-store-200"
                },
                "example": {
                  "data": {
                    "reading": 1,
                    "usage_unit_id": null,
                    "last_service_reading": 1,
                    "maintenance_interval": null,
                    "remaining_until_maintenance": null,
                    "plans": [],
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Регистрация показания",
        "x-required-scopes": [
          "equipment_usage:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/assignments": {
      "get": {
        "operationId": "v1.equipment.assignments.index",
        "tags": [
          "equipment-assignments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1.0,
              "maximum": 100.0
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-assignments-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "product_id": 101,
                      "type": "customers",
                      "identifier": null,
                      "quantity": "1.00",
                      "starts_at": "2026-11-04T09:00:00Z",
                      "expires_at": null,
                      "ended_at": null,
                      "note": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Состав установленного оснащения",
        "x-required-scopes": [
          "equipment_assignments:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment.assignments.store",
        "tags": [
          "equipment-assignments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at выбранного ресурса.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "component",
                      "license",
                      "certificate"
                    ]
                  },
                  "identifier": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,3})?$"
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date"
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "product_id"
                ]
              },
              "example": {
                "product_id": 101
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-assignments-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "type": "customers",
                    "identifier": null,
                    "quantity": "1.00",
                    "starts_at": "2026-11-04T09:00:00Z",
                    "expires_at": null,
                    "ended_at": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Ручное назначение по допустимому источнику",
        "x-required-scopes": [
          "equipment_assignments:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/assignments/{assignment}": {
      "get": {
        "operationId": "v1.equipment.assignments.show",
        "tags": [
          "equipment-assignments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "assignment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-assignments-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "type": "customers",
                    "identifier": null,
                    "quantity": "1.00",
                    "starts_at": "2026-11-04T09:00:00Z",
                    "expires_at": null,
                    "ended_at": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Одна запись оснащения",
        "x-required-scopes": [
          "equipment_assignments:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment": {
      "post": {
        "operationId": "v1.equipment.store",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_model_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "model_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "inventory_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacture_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "installation_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "warranty_expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "catalog_product_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "location": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "technical_specs": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "usage_unit_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "maintenance_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "customer_id",
                  "name"
                ]
              },
              "example": {
                "customer_id": 101,
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "customer_id": 101,
                    "customer_site_id": null,
                    "equipment_model_id": null,
                    "manufacturer_id": null,
                    "device_type_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "inventory_number": null,
                    "manufacture_date": null,
                    "installation_date": null,
                    "warranty_expires_at": null,
                    "catalog_product_id": null,
                    "location": null,
                    "technical_specs": null,
                    "status": "active",
                    "last_maintenance_date": null,
                    "next_maintenance_date": null,
                    "usage_reading": 1,
                    "usage_unit_id": null,
                    "maintenance_interval": null,
                    "note": null,
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "equipment:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "get": {
        "operationId": "v1.equipment.index",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_site_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[equipment_model_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[manufacturer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[device_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "decommissioned",
                "repair",
                "pending_install"
              ]
            }
          },
          {
            "name": "filter[serial_number]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[external_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "customer_id": 101,
                      "customer_site_id": null,
                      "equipment_model_id": null,
                      "manufacturer_id": null,
                      "device_type_id": null,
                      "model_name": null,
                      "serial_number": null,
                      "inventory_number": null,
                      "manufacture_date": null,
                      "installation_date": null,
                      "warranty_expires_at": null,
                      "catalog_product_id": null,
                      "location": null,
                      "technical_specs": null,
                      "status": "active",
                      "last_maintenance_date": null,
                      "next_maintenance_date": null,
                      "usage_reading": 1,
                      "usage_unit_id": null,
                      "maintenance_interval": null,
                      "note": null,
                      "custom_fields": [],
                      "external_id": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "equipment:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/update": {
      "post": {
        "operationId": "v1.equipment.update",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at выбранного ресурса.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_model_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "manufacturer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "model_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "serial_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "inventory_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "manufacture_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "installation_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "warranty_expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "catalog_product_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "location": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "technical_specs": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "usage_unit_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "maintenance_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "customer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "customer_id": 101,
                    "customer_site_id": null,
                    "equipment_model_id": null,
                    "manufacturer_id": null,
                    "device_type_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "inventory_number": null,
                    "manufacture_date": null,
                    "installation_date": null,
                    "warranty_expires_at": null,
                    "catalog_product_id": null,
                    "location": null,
                    "technical_specs": null,
                    "status": "active",
                    "last_maintenance_date": null,
                    "next_maintenance_date": null,
                    "usage_reading": 1,
                    "usage_unit_id": null,
                    "maintenance_interval": null,
                    "note": null,
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "equipment:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/status": {
      "post": {
        "operationId": "v1.equipment.status",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at выбранного ресурса.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "inactive",
                      "decommissioned",
                      "repair"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status"
                ]
              },
              "example": {
                "status": "active"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "customer_id": 101,
                    "customer_site_id": null,
                    "equipment_model_id": null,
                    "manufacturer_id": null,
                    "device_type_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "inventory_number": null,
                    "manufacture_date": null,
                    "installation_date": null,
                    "warranty_expires_at": null,
                    "catalog_product_id": null,
                    "location": null,
                    "technical_specs": null,
                    "status": "active",
                    "last_maintenance_date": null,
                    "next_maintenance_date": null,
                    "usage_reading": 1,
                    "usage_unit_id": null,
                    "maintenance_interval": null,
                    "note": null,
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Смена эксплуатационного состояния",
        "x-required-scopes": [
          "equipment:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}/assignments/{assignment}/end": {
      "post": {
        "operationId": "v1.equipment.assignments.end",
        "tags": [
          "equipment-assignments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "assignment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at выбранного ресурса.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-assignments-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "product_id": 101,
                    "type": "customers",
                    "identifier": null,
                    "quantity": "1.00",
                    "starts_at": "2026-11-04T09:00:00Z",
                    "expires_at": null,
                    "ended_at": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Завершение действия оснащения",
        "x-required-scopes": [
          "equipment_assignments:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects": {
      "get": {
        "operationId": "v1.equipment-defects.index",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[equipment_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Состояние дефекта: обнаружен, в работе, устранён или отклонён.",
              "enum": [
                "open",
                "in_progress",
                "resolved",
                "dismissed"
              ]
            }
          },
          {
            "name": "filter[severity]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Приоритет планового обслуживания.",
              "enum": [
                "low",
                "medium",
                "high",
                "critical"
              ]
            }
          },
          {
            "name": "filter[found_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[found_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "severity": "low",
                      "found_date": null,
                      "status": "open",
                      "resolved_date": null,
                      "reported_by": null,
                      "maintenance_schedule_id": null,
                      "act_id": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "equipment_defects:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment-defects.create",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "severity": {
                    "type": "string",
                    "description": "Приоритет планового обслуживания.",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "found_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "equipment_id",
                  "title"
                ]
              },
              "example": {
                "equipment_id": 101,
                "title": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "equipment_defects:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects/{id}": {
      "get": {
        "operationId": "v1.equipment-defects.show",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "equipment_defects:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects/{id}/update": {
      "post": {
        "operationId": "v1.equipment-defects.update",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "severity": {
                    "type": "string",
                    "description": "Приоритет планового обслуживания.",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "found_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "equipment_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "equipment_defects:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects/{id}/resolve": {
      "post": {
        "operationId": "v1.equipment-defects.resolve",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Фиксация устранения",
        "x-required-scopes": [
          "equipment_defects:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects/{id}/create-maintenance": {
      "post": {
        "operationId": "v1.equipment-defects.create-maintenance",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "planned_date": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "workshop_id"
                ]
              },
              "example": {
                "workshop_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание корректирующей заявки ТО",
        "x-required-scopes": [
          "equipment_defects:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-defects/{id}/create-warranty-act": {
      "post": {
        "operationId": "v1.equipment-defects.create-warranty-act",
        "tags": [
          "equipment-defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "status_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "stock_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "workshop_id"
                ]
              },
              "example": {
                "workshop_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-defects-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "severity": "low",
                    "found_date": null,
                    "status": "open",
                    "resolved_date": null,
                    "reported_by": null,
                    "maintenance_schedule_id": null,
                    "act_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание гарантийного акта",
        "x-required-scopes": [
          "equipment_defects:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр",
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-downtimes": {
      "get": {
        "operationId": "v1.equipment-downtimes.index",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[equipment_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[kind]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unplanned",
                "planned"
              ]
            }
          },
          {
            "name": "filter[state]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "stopped",
                "repair",
                "waiting_parts",
                "restored"
              ]
            }
          },
          {
            "name": "filter[started_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[started_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_id": 101,
                      "kind": "unplanned",
                      "title": "Плановый осмотр",
                      "cause": null,
                      "remedy": null,
                      "started_at": "2026-11-04T09:00:00Z",
                      "restored_at": null,
                      "state": "stopped",
                      "equipment_defect_id": null,
                      "act_id": null,
                      "previous_downtime_id": null,
                      "waiting_parts_seconds": 1,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "equipment_downtimes:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment-downtimes.create",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "unplanned",
                      "planned"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "started_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000
                  },
                  "remedy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000
                  },
                  "equipment_defect_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "previous_downtime_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "act_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "restoration_cost": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
                        "x-validation": [
                          "required_with:restoration_cost"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "x-validation": [
                          "required_with:restoration_cost"
                        ],
                        "minLength": 3,
                        "maxLength": 3,
                        "description": "Валюта context.currency; конвертация не выполняется."
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "equipment_id",
                  "kind",
                  "title",
                  "started_at"
                ]
              },
              "example": {
                "equipment_id": 101,
                "kind": "unplanned",
                "title": "Плановый осмотр",
                "started_at": "2026-11-04T09:00:00Z"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "unplanned",
                    "title": "Плановый осмотр",
                    "cause": null,
                    "remedy": null,
                    "started_at": "2026-11-04T09:00:00Z",
                    "restored_at": null,
                    "state": "stopped",
                    "equipment_defect_id": null,
                    "act_id": null,
                    "previous_downtime_id": null,
                    "waiting_parts_seconds": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "equipment_downtimes:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-downtimes/{id}": {
      "get": {
        "operationId": "v1.equipment-downtimes.show",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "unplanned",
                    "title": "Плановый осмотр",
                    "cause": null,
                    "remedy": null,
                    "started_at": "2026-11-04T09:00:00Z",
                    "restored_at": null,
                    "state": "stopped",
                    "equipment_defect_id": null,
                    "act_id": null,
                    "previous_downtime_id": null,
                    "waiting_parts_seconds": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "equipment_downtimes:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-downtimes/{id}/events": {
      "get": {
        "operationId": "v1.equipment-downtimes.events",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-events-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_downtime_id": 101,
                      "state": "stopped",
                      "occurred_at": "2026-11-04T09:00:00Z"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "История этапов простоя",
        "x-required-scopes": [
          "equipment_downtimes:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-downtimes/{id}/update": {
      "post": {
        "operationId": "v1.equipment-downtimes.update",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "unplanned",
                      "planned"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "started_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000
                  },
                  "remedy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000
                  },
                  "equipment_defect_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "previous_downtime_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "act_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "restoration_cost": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
                        "x-validation": [
                          "required_with:restoration_cost"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "x-validation": [
                          "required_with:restoration_cost"
                        ],
                        "minLength": 3,
                        "maxLength": 3,
                        "description": "Валюта context.currency; конвертация не выполняется."
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "equipment_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "unplanned",
                    "title": "Плановый осмотр",
                    "cause": null,
                    "remedy": null,
                    "started_at": "2026-11-04T09:00:00Z",
                    "restored_at": null,
                    "state": "stopped",
                    "equipment_defect_id": null,
                    "act_id": null,
                    "previous_downtime_id": null,
                    "waiting_parts_seconds": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "equipment_downtimes:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-downtimes/{id}/transition": {
      "post": {
        "operationId": "v1.equipment-downtimes.transition",
        "tags": [
          "equipment-downtimes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "stopped",
                      "repair",
                      "waiting_parts",
                      "restored"
                    ]
                  },
                  "occurred_at": {
                    "type": "string",
                    "maxLength": 64,
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "format": "date-time"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "state"
                ]
              },
              "example": {
                "state": "repair"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-downtimes-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "unplanned",
                    "title": "Плановый осмотр",
                    "cause": null,
                    "remedy": null,
                    "started_at": "2026-11-04T09:00:00Z",
                    "restored_at": null,
                    "state": "stopped",
                    "equipment_defect_id": null,
                    "act_id": null,
                    "previous_downtime_id": null,
                    "waiting_parts_seconds": 1,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Переход stopped / repair / waiting_parts / restored",
        "x-required-scopes": [
          "equipment_downtimes:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{equipment_id}/media": {
      "get": {
        "operationId": "v1.equipment-media.index",
        "tags": [
          "equipment-media"
        ],
        "parameters": [
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "filter[kind]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "photo",
                "document"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-media-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_id": 101,
                      "kind": "document",
                      "filename": "attachment.pdf",
                      "mime_type": "application/pdf",
                      "size": 1,
                      "created_at": null,
                      "version": "1793782800",
                      "download_url": "https://organization.example/"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список метаданных основного фото и документов",
        "x-required-scopes": [
          "equipment_media:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment-media.store",
        "tags": [
          "equipment-media"
        ],
        "parameters": [
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "description": "Обязателен для kind=photo: версия оборудования.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "photo",
                      "document"
                    ]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Файл от 1 до 10 МиБ включительно; MIME проверяется по содержимому."
                  },
                  "client_filename": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "kind",
                  "file"
                ]
              },
              "example": {
                "kind": "document",
                "file": "FILE_BYTES"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-media-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "document",
                    "filename": "attachment.pdf",
                    "mime_type": "application/pdf",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Добавление документа или установка основного фото, multipart/form-data",
        "x-required-scopes": [
          "equipment_media:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{equipment_id}/media/{id}": {
      "get": {
        "operationId": "v1.equipment-media.show",
        "tags": [
          "equipment-media"
        ],
        "parameters": [
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-media-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "kind": "document",
                    "filename": "attachment.pdf",
                    "mime_type": "application/pdf",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка файла с версией и ETag",
        "x-required-scopes": [
          "equipment_media:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{equipment_id}/media/{id}/download": {
      "get": {
        "operationId": "v1.equipment-media.download",
        "tags": [
          "equipment-media"
        ],
        "parameters": [
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Защищённое скачивание содержимого",
        "x-required-scopes": [
          "equipment_media:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{equipment_id}/media/{id}/delete": {
      "post": {
        "operationId": "v1.equipment-media.destroy",
        "tags": [
          "equipment-media"
        ],
        "parameters": [
          {
            "name": "equipment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление файла, JSON `{}`",
        "x-required-scopes": [
          "equipment_media:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-models": {
      "get": {
        "operationId": "v1.equipment-models.index",
        "tags": [
          "equipment-models"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[manufacturer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[device_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[model_name]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-models-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                      "manufacturer_id": 101,
                      "device_type_id": 101,
                      "model_name": "пример",
                      "modification": null,
                      "firmware": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "equipment_models:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.equipment-models.create",
        "tags": [
          "equipment-models"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "manufacturer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "model_name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "modification": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "firmware": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "manufacturer_id",
                  "device_type_id",
                  "model_name"
                ]
              },
              "example": {
                "manufacturer_id": 101,
                "device_type_id": 101,
                "model_name": "пример"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-models-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "manufacturer_id": 101,
                    "device_type_id": 101,
                    "model_name": "пример",
                    "modification": null,
                    "firmware": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "equipment_models:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-models/{id}": {
      "get": {
        "operationId": "v1.equipment-models.show",
        "tags": [
          "equipment-models"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-models-show-200"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "manufacturer_id": 101,
                    "device_type_id": 101,
                    "model_name": "пример",
                    "modification": null,
                    "firmware": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "equipment_models:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment-models/{id}/update": {
      "post": {
        "operationId": "v1.equipment-models.update",
        "tags": [
          "equipment-models"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "manufacturer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "device_type_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "model_name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "modification": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "firmware": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "manufacturer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-models-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "manufacturer_id": 101,
                    "device_type_id": 101,
                    "model_name": "пример",
                    "modification": null,
                    "firmware": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "equipment_models:write"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads": {
      "get": {
        "operationId": "v1.leads.index",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "active",
                "converted",
                "archived"
              ]
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[assigned_user_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[external_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "format": "date-time"
            }
          },
          {
            "name": "filter[updated_before]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": null,
                      "phone": null,
                      "email": null,
                      "customer_id": null,
                      "assigned_user_id": null,
                      "status": "new",
                      "follow_up_at": null,
                      "desired_at": null,
                      "external_id": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "leads:read"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.leads.store",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "customer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "follow_up_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "desired_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "message"
                ],
                "anyOf": [
                  {
                    "required": [
                      "phone"
                    ],
                    "properties": {
                      "phone": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  {
                    "required": [
                      "email"
                    ],
                    "properties": {
                      "email": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  }
                ]
              },
              "example": {
                "message": "Плановый осмотр",
                "email": "integration@example.com"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "phone": null,
                    "email": null,
                    "customer_id": null,
                    "assigned_user_id": null,
                    "status": "new",
                    "follow_up_at": null,
                    "desired_at": null,
                    "external_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "leads:write"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads/{id}": {
      "get": {
        "operationId": "v1.leads.show",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "phone": null,
                    "email": null,
                    "customer_id": null,
                    "assigned_user_id": null,
                    "status": "new",
                    "follow_up_at": null,
                    "desired_at": null,
                    "external_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "leads:read"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads/{id}/update": {
      "post": {
        "operationId": "v1.leads.update",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255
                  },
                  "customer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "follow_up_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "desired_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "phone": null,
                    "email": null,
                    "customer_id": null,
                    "assigned_user_id": null,
                    "status": "new",
                    "follow_up_at": null,
                    "desired_at": null,
                    "external_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "leads:write"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads/{id}/status": {
      "post": {
        "operationId": "v1.leads.status",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "active",
                      "archived"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status"
                ]
              },
              "example": {
                "status": "new"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "phone": null,
                    "email": null,
                    "customer_id": null,
                    "assigned_user_id": null,
                    "status": "new",
                    "follow_up_at": null,
                    "desired_at": null,
                    "external_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Допустимое изменение статуса",
        "x-required-scopes": [
          "leads:write"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads/{id}/assign": {
      "post": {
        "operationId": "v1.leads.assign",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "assigned_user_id"
                ]
              },
              "example": {
                "assigned_user_id": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": null,
                    "phone": null,
                    "email": null,
                    "customer_id": null,
                    "assigned_user_id": null,
                    "status": "new",
                    "follow_up_at": null,
                    "desired_at": null,
                    "external_id": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Назначение ответственного",
        "x-required-scopes": [
          "leads:write"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/leads/{id}/convert": {
      "post": {
        "operationId": "v1.leads.convert",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "existing",
                      "new"
                    ]
                  },
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1,
                    "x-validation": [
                      "required_if:mode,existing",
                      "prohibited_if:mode,new"
                    ]
                  },
                  "customer": {
                    "type": "object",
                    "items": {
                      "type": "string"
                    },
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "company_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "additional_phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                      },
                      "address": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "inn": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "kpp": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "ogrn": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "internal_note": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 10000
                      },
                      "is_customer": {
                        "type": "boolean"
                      },
                      "is_supplier": {
                        "type": "boolean"
                      },
                      "bank": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "bik": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "account": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          },
                          "correspondent_account": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 255
                          }
                        }
                      },
                      "contacts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 40
                            },
                            "position": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 40
                            },
                            "phone": {
                              "type": "string",
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "name",
                            "phone"
                          ]
                        },
                        "maxItems": 100
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field_id": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string"
                                    },
                                    "currency": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "field_id",
                            "value"
                          ]
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "external_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "name",
                      "phone"
                    ],
                    "title": "Параметры создания клиента"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ],
                "oneOf": [
                  {
                    "properties": {
                      "mode": {
                        "const": "existing"
                      }
                    },
                    "required": [
                      "customer_id"
                    ],
                    "not": {
                      "required": [
                        "customer"
                      ]
                    }
                  },
                  {
                    "properties": {
                      "mode": {
                        "const": "new"
                      }
                    },
                    "required": [
                      "customer"
                    ],
                    "not": {
                      "required": [
                        "customer_id"
                      ]
                    }
                  }
                ]
              },
              "example": {
                "mode": "existing",
                "customer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-leads-convert-200"
                },
                "example": {
                  "data": {
                    "lead_id": 101,
                    "customer_id": 101,
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Конвертация в клиента с явным выбором соответствия",
        "x-required-scopes": [
          "leads:write"
        ],
        "x-required-permissions": [
          "Лиды и заявки → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/equipment/{id}": {
      "get": {
        "operationId": "v1.equipment.show",
        "tags": [
          "equipment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "customer_id": 101,
                    "customer_site_id": null,
                    "equipment_model_id": null,
                    "manufacturer_id": null,
                    "device_type_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "inventory_number": null,
                    "manufacture_date": null,
                    "installation_date": null,
                    "warranty_expires_at": null,
                    "catalog_product_id": null,
                    "location": null,
                    "technical_specs": null,
                    "status": "active",
                    "last_maintenance_date": null,
                    "next_maintenance_date": null,
                    "usage_reading": 1,
                    "usage_unit_id": null,
                    "maintenance_interval": null,
                    "note": null,
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "equipment:read"
        ],
        "x-required-permissions": [
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/customer-sites/{id}": {
      "get": {
        "operationId": "v1.customer-sites.show",
        "tags": [
          "customer-sites"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-customer-sites-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "customer_id": 101,
                    "name": "Плановый осмотр",
                    "code": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "contact_name": null,
                    "phone": null,
                    "email": null,
                    "note": null,
                    "is_active": true,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "customer_sites:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts": {
      "get": {
        "operationId": "v1.service-contracts.index",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_site_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "suspended",
                "ended"
              ]
            }
          },
          {
            "name": "filter[start_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[start_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[end_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "number": null,
                      "title": null,
                      "customer_id": null,
                      "customer_site_id": null,
                      "workshop_id": null,
                      "status": "draft",
                      "billing_period": "monthly",
                      "reaction_hours": null,
                      "resolution_hours": null,
                      "start_date": null,
                      "end_date": null,
                      "equipment_ids": [],
                      "next_maintenance_date": null,
                      "maintenance_interval_days": null,
                      "note": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "service_contracts:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.service-contracts.store",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "number": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "billing_period": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      "yearly"
                    ]
                  },
                  "fee": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:fee"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:fee"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "reaction_hours": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "resolution_hours": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "discount_operations": {
                    "type": "number",
                    "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,2})?$",
                    "minLength": 0,
                    "maxLength": 100,
                    "minimum": 0.0,
                    "maximum": 100.0
                  },
                  "discount_products": {
                    "type": "number",
                    "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,2})?$",
                    "minLength": 0,
                    "maxLength": 100,
                    "minimum": 0.0,
                    "maximum": 100.0
                  },
                  "start_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "end_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "maintenance_interval_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "customer_id",
                  "workshop_id",
                  "title",
                  "billing_period",
                  "fee"
                ]
              },
              "example": {
                "customer_id": 101,
                "workshop_id": 101,
                "title": "Плановый осмотр",
                "billing_period": "monthly",
                "fee": {
                  "amount": "1.00",
                  "currency": "RUB"
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": null,
                    "title": null,
                    "customer_id": null,
                    "customer_site_id": null,
                    "workshop_id": null,
                    "status": "draft",
                    "billing_period": "monthly",
                    "reaction_hours": null,
                    "resolution_hours": null,
                    "start_date": null,
                    "end_date": null,
                    "equipment_ids": [],
                    "next_maintenance_date": null,
                    "maintenance_interval_days": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "service_contracts:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение",
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{id}": {
      "get": {
        "operationId": "v1.service-contracts.show",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": null,
                    "title": null,
                    "customer_id": null,
                    "customer_site_id": null,
                    "workshop_id": null,
                    "status": "draft",
                    "billing_period": "monthly",
                    "reaction_hours": null,
                    "resolution_hours": null,
                    "start_date": null,
                    "end_date": null,
                    "equipment_ids": [],
                    "next_maintenance_date": null,
                    "maintenance_interval_days": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "service_contracts:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios": {
      "get": {
        "operationId": "v1.maintenance-scenarios.index",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[key]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "filter[device_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "key": "demo_inspection",
                      "description": null,
                      "is_active": true,
                      "equipment_state_key": "demo_inspection",
                      "calculation_rules": null,
                      "device_type_ids": [],
                      "custom_fields": [],
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "maintenance_scenarios:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.maintenance-scenarios.create",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "key": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_-]*$",
                    "maxLength": 191
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "equipment_state_key": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_-]*$",
                    "maxLength": 191
                  },
                  "calculation_rules": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "device_type_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "key"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "key": "demo_inspection"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "key": "demo_inspection",
                    "description": null,
                    "is_active": true,
                    "equipment_state_key": "demo_inspection",
                    "calculation_rules": null,
                    "device_type_ids": [],
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{id}": {
      "get": {
        "operationId": "v1.maintenance-scenarios.show",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "key": "demo_inspection",
                    "description": null,
                    "is_active": true,
                    "equipment_state_key": "demo_inspection",
                    "calculation_rules": null,
                    "device_type_ids": [],
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "maintenance_scenarios:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules": {
      "get": {
        "operationId": "v1.maintenance-schedules.index",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[equipment_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_site_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[assigned_user_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "planned",
                "in_progress",
                "completed",
                "overdue",
                "cancelled"
              ]
            }
          },
          {
            "name": "filter[act_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[visit_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[planned_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[planned_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[overdue]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "type": "preventive",
                      "priority": "пример",
                      "planned_date": "пример",
                      "deadline_at": null,
                      "assigned_user_id": null,
                      "scenario_id": null,
                      "service_contract_id": null,
                      "workshop_id": null,
                      "status": "planned",
                      "completed_date": null,
                      "result": null,
                      "act_id": null,
                      "visit_id": null,
                      "maintenance_plan_id": null,
                      "custom_fields": [],
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "maintenance_schedules:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.maintenance-schedules.store",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "planned_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "deadline_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "title",
                  "planned_date",
                  "equipment_id"
                ]
              },
              "example": {
                "title": "Плановый осмотр",
                "planned_date": "2026-11-04",
                "equipment_id": 101
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}": {
      "get": {
        "operationId": "v1.maintenance-schedules.show",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "maintenance_schedules:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{schedule_id}/checklist-results": {
      "get": {
        "operationId": "v1.maintenance-checklists.index",
        "tags": [
          "maintenance-checklist-results"
        ],
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-checklists-index-200"
                },
                "example": {
                  "data": {
                    "items": [
                      {
                        "id": 101,
                        "title": "Плановый осмотр",
                        "description": null,
                        "is_required": true,
                        "is_completed": true,
                        "note": null,
                        "completed_by": null,
                        "completed_at": null,
                        "version": 1,
                        "operation_id": null,
                        "equipment_checklist_id": null,
                        "scenario_checklist_item_id": null
                      }
                    ],
                    "schedule_version": "1793782800"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Сохранённые результаты",
        "x-required-scopes": [
          "maintenance_checklists:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.maintenance-checklists.store",
        "tags": [
          "maintenance-checklist-results"
        ],
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_required": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "title"
                ]
              },
              "example": {
                "title": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-checklists-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "is_required": true,
                    "is_completed": true,
                    "note": null,
                    "completed_by": null,
                    "completed_at": null,
                    "version": 1,
                    "operation_id": null,
                    "equipment_checklist_id": null,
                    "scenario_checklist_item_id": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Добавление ручного пункта",
        "x-required-scopes": [
          "maintenance_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{schedule_id}/checklist-results/initialize": {
      "post": {
        "operationId": "v1.maintenance-checklists.initialize",
        "tags": [
          "maintenance-checklist-results"
        ],
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-checklists-initialize-200"
                },
                "example": {
                  "data": {
                    "items": [
                      {
                        "id": 101,
                        "title": "Плановый осмотр",
                        "description": null,
                        "is_required": true,
                        "is_completed": true,
                        "note": null,
                        "completed_by": null,
                        "completed_at": null,
                        "version": 1,
                        "operation_id": null,
                        "equipment_checklist_id": null,
                        "scenario_checklist_item_id": null
                      }
                    ],
                    "schedule_version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Подготовка сохранённого чек-листа заявки",
        "x-required-scopes": [
          "maintenance_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{schedule_id}/checklist-results/{id}/update": {
      "post": {
        "operationId": "v1.maintenance-checklists.update",
        "tags": [
          "maintenance-checklist-results"
        ],
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "is_completed": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "version"
                ],
                "anyOf": [
                  {
                    "required": [
                      "is_completed"
                    ]
                  },
                  {
                    "required": [
                      "note"
                    ]
                  }
                ]
              },
              "example": {
                "version": 1,
                "is_completed": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-checklists-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "is_required": true,
                    "is_completed": true,
                    "note": null,
                    "completed_by": null,
                    "completed_at": null,
                    "version": 1,
                    "operation_id": null,
                    "equipment_checklist_id": null,
                    "scenario_checklist_item_id": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Сохранение отметки выполнения и примечания с проверкой версии",
        "x-required-scopes": [
          "maintenance_checklists:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans": {
      "get": {
        "operationId": "v1.maintenance-plans.index",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "filter[equipment_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[maintenance_regulation_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "paused",
                "ended"
              ]
            }
          },
          {
            "name": "filter[trigger_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "calendar",
                "usage",
                "hybrid",
                "equipment_date"
              ]
            }
          },
          {
            "name": "filter[next_due_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[next_due_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1.0,
              "maximum": 100.0
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "equipment_id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "type": "preventive",
                      "priority": "пример",
                      "trigger_type": "пример",
                      "schedule_mode": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "usage_interval": null,
                      "usage_lead": 1,
                      "anchor_date": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "workshop_id": null,
                      "scenario_defaults": {},
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "assigned_user_id": null,
                      "scenario_id": null,
                      "service_contract_id": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": null,
                      "lead_time_days": 1,
                      "next_due_date": null,
                      "next_due_usage": null,
                      "next_cycle_number": 1,
                      "maintenance_regulation_id": null,
                      "regulation_overridden": true,
                      "revision": 1,
                      "status": "active",
                      "equipment_date_field": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "maintenance_plans:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.maintenance-plans.store",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "trigger_type": {
                    "type": "string",
                    "enum": [
                      "calendar",
                      "usage",
                      "hybrid"
                    ]
                  },
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "anchor_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "schedule_mode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "fixed",
                      "floating",
                      null
                    ]
                  },
                  "calendar_interval_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1.0,
                    "maximum": 1000.0
                  },
                  "calendar_interval_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year",
                      null
                    ]
                  },
                  "calendar_pattern": {
                    "type": "string",
                    "enum": [
                      "interval",
                      "weekdays",
                      "month_days"
                    ]
                  },
                  "week_days": {
                    "type": "array",
                    "maxItems": 7,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1.0,
                      "maximum": 7.0
                    }
                  },
                  "month_days": {
                    "type": "array",
                    "maxItems": 32,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 0.0,
                      "maximum": 31.0
                    }
                  },
                  "usage_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_lead": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "lead_time_days": {
                    "type": "integer",
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "generation_time": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "completion_window_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "completion_window_unit": {
                    "type": "string",
                    "enum": [
                      "hour",
                      "day",
                      "week"
                    ]
                  },
                  "scenario_defaults": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxProperties": 100
                  },
                  "equipment_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "title",
                  "trigger_type",
                  "starts_on",
                  "equipment_id"
                ]
              },
              "example": {
                "title": "Плановый осмотр",
                "trigger_type": "calendar",
                "starts_on": "2026-11-04",
                "equipment_id": 101,
                "workshop_id": 101,
                "schedule_mode": "fixed",
                "calendar_interval_value": 1,
                "calendar_interval_unit": "month",
                "anchor_date": "2026-11-04"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}": {
      "get": {
        "operationId": "v1.maintenance-plans.show",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "maintenance_plans:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}/update": {
      "post": {
        "operationId": "v1.maintenance-plans.update",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at плана обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "trigger_type": {
                    "type": "string",
                    "enum": [
                      "calendar",
                      "usage",
                      "hybrid"
                    ]
                  },
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "anchor_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "schedule_mode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "fixed",
                      "floating",
                      null
                    ]
                  },
                  "calendar_interval_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1.0,
                    "maximum": 1000.0
                  },
                  "calendar_interval_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year",
                      null
                    ]
                  },
                  "calendar_pattern": {
                    "type": "string",
                    "enum": [
                      "interval",
                      "weekdays",
                      "month_days"
                    ]
                  },
                  "week_days": {
                    "type": "array",
                    "maxItems": 7,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1.0,
                      "maximum": 7.0
                    }
                  },
                  "month_days": {
                    "type": "array",
                    "maxItems": 32,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 0.0,
                      "maximum": 31.0
                    }
                  },
                  "usage_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_lead": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "lead_time_days": {
                    "type": "integer",
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "generation_time": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "completion_window_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "completion_window_unit": {
                    "type": "string",
                    "enum": [
                      "hour",
                      "day",
                      "week"
                    ]
                  },
                  "scenario_defaults": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxProperties": 100
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "title": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}/pause": {
      "post": {
        "operationId": "v1.maintenance-plans.pause",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at плана обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Пауза плана",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}/resume": {
      "post": {
        "operationId": "v1.maintenance-plans.resume",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at плана обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Возобновление",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}/end": {
      "post": {
        "operationId": "v1.maintenance-plans.end",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at плана обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-plans-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "trigger_type": "пример",
                    "schedule_mode": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "usage_interval": null,
                    "usage_lead": 1,
                    "anchor_date": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "workshop_id": null,
                    "scenario_defaults": {},
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": null,
                    "lead_time_days": 1,
                    "next_due_date": null,
                    "next_due_usage": null,
                    "next_cycle_number": 1,
                    "maintenance_regulation_id": null,
                    "regulation_overridden": true,
                    "revision": 1,
                    "status": "active",
                    "equipment_date_field": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Завершение",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-plans/{id}/generate": {
      "post": {
        "operationId": "v1.maintenance-plans.generate",
        "tags": [
          "maintenance-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at плана обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание заявки текущего допустимого цикла",
        "x-required-scopes": [
          "maintenance_plans:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations": {
      "get": {
        "operationId": "v1.maintenance-regulations.index",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "filter[scope_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "equipment",
                "models",
                "types",
                "customer",
                "site",
                "contract"
              ]
            }
          },
          {
            "name": "filter[customer_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[customer_site_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[service_contract_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "paused",
                "ended"
              ]
            }
          },
          {
            "name": "filter[trigger_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "calendar",
                "usage",
                "hybrid",
                "equipment_date"
              ]
            }
          },
          {
            "name": "filter[updated_since]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "updated_at,id",
                "-updated_at,-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1.0,
              "maximum": 100.0
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "maintenance_regulations:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.maintenance-regulations.store",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "trigger_type": {
                    "type": "string",
                    "enum": [
                      "calendar",
                      "usage",
                      "hybrid",
                      "equipment_date"
                    ]
                  },
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "anchor_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "schedule_mode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "fixed",
                      "floating",
                      null
                    ]
                  },
                  "calendar_interval_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1.0,
                    "maximum": 1000.0
                  },
                  "calendar_interval_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year",
                      null
                    ]
                  },
                  "calendar_pattern": {
                    "type": "string",
                    "enum": [
                      "interval",
                      "weekdays",
                      "month_days"
                    ]
                  },
                  "week_days": {
                    "type": "array",
                    "maxItems": 7,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1.0,
                      "maximum": 7.0
                    }
                  },
                  "month_days": {
                    "type": "array",
                    "maxItems": 32,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 0.0,
                      "maximum": 31.0
                    }
                  },
                  "usage_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_lead": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "lead_time_days": {
                    "type": "integer",
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "generation_time": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "completion_window_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "completion_window_unit": {
                    "type": "string",
                    "enum": [
                      "hour",
                      "day",
                      "week"
                    ]
                  },
                  "scenario_defaults": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxProperties": 100
                  },
                  "scope_type": {
                    "type": "string",
                    "enum": [
                      "equipment",
                      "models",
                      "types",
                      "customer",
                      "site",
                      "contract"
                    ]
                  },
                  "customer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_unit_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_date_field": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 191
                  },
                  "equipment_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "equipment_model_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "device_type_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "excluded_equipment_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "title",
                  "trigger_type",
                  "starts_on",
                  "scope_type"
                ]
              },
              "example": {
                "title": "Плановый осмотр",
                "trigger_type": "calendar",
                "starts_on": "2026-11-04",
                "scope_type": "equipment",
                "workshop_id": 101,
                "schedule_mode": "fixed",
                "calendar_interval_value": 1,
                "calendar_interval_unit": "month",
                "anchor_date": "2026-11-04",
                "equipment_ids": [
                  101
                ]
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}": {
      "get": {
        "operationId": "v1.maintenance-regulations.show",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "maintenance_regulations:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}/update": {
      "post": {
        "operationId": "v1.maintenance-regulations.update",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at регламента обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "trigger_type": {
                    "type": "string",
                    "enum": [
                      "calendar",
                      "usage",
                      "hybrid",
                      "equipment_date"
                    ]
                  },
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "anchor_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "schedule_mode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "fixed",
                      "floating",
                      null
                    ]
                  },
                  "calendar_interval_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1.0,
                    "maximum": 1000.0
                  },
                  "calendar_interval_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "day",
                      "week",
                      "month",
                      "year",
                      null
                    ]
                  },
                  "calendar_pattern": {
                    "type": "string",
                    "enum": [
                      "interval",
                      "weekdays",
                      "month_days"
                    ]
                  },
                  "week_days": {
                    "type": "array",
                    "maxItems": 7,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1.0,
                      "maximum": 7.0
                    }
                  },
                  "month_days": {
                    "type": "array",
                    "maxItems": 32,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 0.0,
                      "maximum": 31.0
                    }
                  },
                  "usage_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_lead": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "lead_time_days": {
                    "type": "integer",
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "generation_time": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "completion_window_value": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0.0,
                    "maximum": 3650.0
                  },
                  "completion_window_unit": {
                    "type": "string",
                    "enum": [
                      "hour",
                      "day",
                      "week"
                    ]
                  },
                  "scenario_defaults": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxProperties": 100
                  },
                  "scope_type": {
                    "type": "string",
                    "enum": [
                      "equipment",
                      "models",
                      "types",
                      "customer",
                      "site",
                      "contract"
                    ]
                  },
                  "customer_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "usage_unit_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "equipment_date_field": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 191
                  },
                  "equipment_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "equipment_model_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "device_type_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "excluded_equipment_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "title": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}/pause": {
      "post": {
        "operationId": "v1.maintenance-regulations.pause",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at регламента обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Приостановка действия регламента",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}/resume": {
      "post": {
        "operationId": "v1.maintenance-regulations.resume",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at регламента обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Возобновление действия регламента",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}/end": {
      "post": {
        "operationId": "v1.maintenance-regulations.end",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at регламента обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Завершение регламента",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-regulations/{id}/sync": {
      "post": {
        "operationId": "v1.maintenance-regulations.sync",
        "tags": [
          "maintenance-regulations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at регламента обслуживания.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "scope_type": "пример",
                    "customer_id": null,
                    "customer_site_id": null,
                    "service_contract_id": null,
                    "workshop_id": 101,
                    "equipment_ids": [],
                    "equipment_model_ids": [],
                    "device_type_ids": [],
                    "excluded_equipment_ids": [],
                    "trigger_type": "пример",
                    "type": "preventive",
                    "priority": "пример",
                    "schedule_mode": null,
                    "anchor_date": null,
                    "calendar_interval_value": null,
                    "calendar_interval_unit": null,
                    "calendar_pattern": "пример",
                    "week_days": [],
                    "month_days": [],
                    "usage_interval": null,
                    "usage_lead": 1,
                    "usage_unit_id": null,
                    "equipment_date_field": null,
                    "starts_on": "пример",
                    "ends_on": null,
                    "generation_time": "2026-11-04T09:00:00Z",
                    "lead_time_days": 1,
                    "completion_window_value": null,
                    "completion_window_unit": "пример",
                    "scenario_id": null,
                    "assigned_user_id": null,
                    "scenario_defaults": {},
                    "status": "active",
                    "revision": 1,
                    "synced_at": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-regulations-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing",
                    "regulation": {
                      "id": 101,
                      "title": "Плановый осмотр",
                      "description": null,
                      "scope_type": "пример",
                      "customer_id": null,
                      "customer_site_id": null,
                      "service_contract_id": null,
                      "workshop_id": 101,
                      "equipment_ids": [],
                      "equipment_model_ids": [],
                      "device_type_ids": [],
                      "excluded_equipment_ids": [],
                      "trigger_type": "пример",
                      "type": "preventive",
                      "priority": "пример",
                      "schedule_mode": null,
                      "anchor_date": null,
                      "calendar_interval_value": null,
                      "calendar_interval_unit": null,
                      "calendar_pattern": "пример",
                      "week_days": [],
                      "month_days": [],
                      "usage_interval": null,
                      "usage_lead": 1,
                      "usage_unit_id": null,
                      "equipment_date_field": null,
                      "starts_on": "пример",
                      "ends_on": null,
                      "generation_time": "2026-11-04T09:00:00Z",
                      "lead_time_days": 1,
                      "completion_window_value": null,
                      "completion_window_unit": "пример",
                      "scenario_id": null,
                      "assigned_user_id": null,
                      "scenario_defaults": {},
                      "status": "active",
                      "revision": 1,
                      "synced_at": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Согласование состава оборудования и индивидуальных планов",
        "x-required-scopes": [
          "maintenance_regulations:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-reports/calendar": {
      "get": {
        "operationId": "v1.maintenance-reports.calendar",
        "tags": [
          "maintenance-reports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "x-validation": [
                "after_or_equal:from"
              ]
            }
          },
          {
            "name": "equipment_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "workshop_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-reports-calendar-200"
                },
                "example": {
                  "data": {
                    "from": "пример",
                    "to": "пример",
                    "items": [
                      {
                        "kind": "schedule",
                        "schedule_id": null,
                        "plan_id": null,
                        "equipment_id": 101,
                        "workshop_id": 101,
                        "date": "пример",
                        "deadline_at": null,
                        "status": null,
                        "cycle": null,
                        "conditional": true,
                        "reason": null
                      }
                    ],
                    "totals": {
                      "existing": 1,
                      "forecast": 1,
                      "undated_plans": 1,
                      "truncated": true
                    },
                    "explanation": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Прогноз и существующие работы за ограниченный период",
        "x-required-scopes": [
          "maintenance_reports:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр",
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-reports/plan-fact": {
      "get": {
        "operationId": "v1.maintenance-reports.plan-fact",
        "tags": [
          "maintenance-reports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "x-validation": [
                "after_or_equal:from"
              ]
            }
          },
          {
            "name": "equipment_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "workshop_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-reports-plan-fact-200"
                },
                "example": {
                  "data": {
                    "from": "пример",
                    "to": "пример",
                    "items": [
                      {
                        "month": "пример",
                        "planned": 1,
                        "completed": 1,
                        "completion_rate": null
                      }
                    ],
                    "totals": {
                      "planned": 1,
                      "completed": 1,
                      "on_time": 1,
                      "completion_rate": null,
                      "on_time_rate": null,
                      "mean_days_to_complete": null,
                      "mean_days_between_services": null
                    },
                    "explanation": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "План/факт и исполнение ППР",
        "x-required-scopes": [
          "maintenance_reports:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр",
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-reports/parts": {
      "get": {
        "operationId": "v1.maintenance-reports.parts",
        "tags": [
          "maintenance-reports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "x-validation": [
                "after_or_equal:from"
              ]
            }
          },
          {
            "name": "equipment_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "workshop_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "stock_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-reports-parts-200"
                },
                "example": {
                  "data": {
                    "from": "пример",
                    "to": "пример",
                    "items": [
                      {
                        "product_id": 101,
                        "name": null,
                        "measure_id": 101,
                        "date": "пример",
                        "quantity": "1.00",
                        "reserved_quantity": null,
                        "issued_quantity": null,
                        "uncovered_quantity": null
                      }
                    ],
                    "totals": {
                      "lines": 1,
                      "stock_id": null,
                      "stock_explanation": null
                    },
                    "explanation": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Прогноз потребности в расходниках",
        "x-required-scopes": [
          "maintenance_reports:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр",
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-reports/reliability": {
      "get": {
        "operationId": "v1.maintenance-reports.reliability",
        "tags": [
          "maintenance-reports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "x-validation": [
                "after_or_equal:from"
              ]
            }
          },
          {
            "name": "equipment_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "workshop_ids[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              },
              "uniqueItems": true,
              "maxItems": 100
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "include_costs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-reports-reliability-200"
                },
                "example": {
                  "data": {
                    "from": "пример",
                    "to": "пример",
                    "items": [
                      {
                        "equipment_id": 101,
                        "failures": 1,
                        "repeats": 1,
                        "active": 1,
                        "unplanned_hours": 1,
                        "planned_hours": 1,
                        "waiting_hours": 1
                      }
                    ],
                    "totals": {
                      "failures": 1,
                      "repeats": 1,
                      "active": 1,
                      "unplanned_hours": 1,
                      "planned_hours": 1,
                      "waiting_hours": 1,
                      "mean_restore_hours": null,
                      "mean_operating_hours": null
                    },
                    "explanation": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Отказы, простои и показатели восстановления",
        "x-required-scopes": [
          "maintenance_reports:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр",
          "ТОиР — Оборудование → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/import": {
      "post": {
        "operationId": "v1.maintenance-scenarios.import",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format_version": {
                    "type": "integer",
                    "enum": [
                      1
                    ]
                  },
                  "exported_at": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "fingerprint": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "scenario": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "key": {
                        "type": "string",
                        "maxLength": 191,
                        "pattern": "^[a-z][a-z0-9_-]*$"
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 10000
                      },
                      "is_active": {
                        "type": "boolean"
                      },
                      "equipment_state_key": {
                        "type": "string",
                        "maxLength": 191,
                        "pattern": "^[a-z][a-z0-9_-]*$"
                      },
                      "calculation_rules": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "maxItems": 100
                      },
                      "device_type_names": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "uniqueItems": true,
                        "maxItems": 100
                      },
                      "custom_fields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 255
                            },
                            "code": {
                              "type": "string",
                              "maxLength": 191,
                              "pattern": "^[a-z][a-z0-9_]*$",
                              "not": {
                                "enum": [
                                  "today",
                                  "state",
                                  "equipment",
                                  "customer",
                                  "days_since_last_maintenance"
                                ]
                              }
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text",
                                "textarea",
                                "richtext",
                                "number",
                                "money",
                                "phone",
                                "select",
                                "multiselect",
                                "date",
                                "datetime",
                                "toggle",
                                "url",
                                "email",
                                "radio",
                                "checkbox_list"
                              ]
                            },
                            "is_required": {
                              "type": "boolean"
                            },
                            "is_active": {
                              "type": "boolean"
                            },
                            "sort_order": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 2147483647
                            },
                            "options": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {},
                              "maxItems": 100
                            },
                            "field_options": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "label": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "sort_order": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647
                                  }
                                },
                                "required": [
                                  "value",
                                  "label"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 100
                            }
                          },
                          "required": [
                            "name",
                            "code",
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 100
                      },
                      "checklist_items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "operation_name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 255
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 10000
                            },
                            "sort_order": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 4294967295
                            },
                            "is_required": {
                              "type": "boolean"
                            },
                            "is_active": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 100
                      }
                    },
                    "required": [
                      "name",
                      "key"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "format_version",
                  "scenario"
                ]
              },
              "example": {
                "format_version": 1,
                "scenario": {
                  "name": "Плановый осмотр",
                  "key": "demo_inspection"
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "key": "demo_inspection",
                    "description": null,
                    "is_active": true,
                    "equipment_state_key": "demo_inspection",
                    "calculation_rules": null,
                    "device_type_ids": [],
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Проверяемый импорт шаблона",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{id}/update": {
      "post": {
        "operationId": "v1.maintenance-scenarios.update",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "key": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_-]*$",
                    "maxLength": 191
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "equipment_state_key": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_-]*$",
                    "maxLength": 191
                  },
                  "calculation_rules": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "device_type_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "key": "demo_inspection",
                    "description": null,
                    "is_active": true,
                    "equipment_state_key": "demo_inspection",
                    "calculation_rules": null,
                    "device_type_ids": [],
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{id}/archive": {
      "post": {
        "operationId": "v1.maintenance-scenarios.archive",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-create-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "key": "demo_inspection",
                    "description": null,
                    "is_active": true,
                    "equipment_state_key": "demo_inspection",
                    "calculation_rules": null,
                    "device_type_ids": [],
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Архивация или удаление с проверкой зависимостей",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{id}/simulate": {
      "post": {
        "operationId": "v1.maintenance-scenarios.simulate",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fields": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    },
                    "description": "Демонстрационные данные для проверки правил. Допустимые поля equipment и customer перечислены в описании сценариев."
                  },
                  "state": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    },
                    "description": "Демонстрационные данные для проверки правил. Допустимые поля equipment и customer перечислены в описании сценариев."
                  },
                  "equipment": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    },
                    "description": "Демонстрационные данные для проверки правил. Допустимые поля equipment и customer перечислены в описании сценариев."
                  },
                  "customer": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    },
                    "description": "Демонстрационные данные для проверки правил. Допустимые поля equipment и customer перечислены в описании сценариев."
                  },
                  "today": {
                    "type": "string",
                    "format": "date"
                  },
                  "days_since_last_maintenance": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 365000
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "today": "2026-11-04",
                "fields": {},
                "state": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-simulate-200"
                },
                "example": {
                  "data": {
                    "traces": [],
                    "final_state": {},
                    "first_matched_rule_index": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Проверка расчётных правил без изменения оборудования",
        "x-required-scopes": [
          "maintenance_scenarios:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-scenarios/{id}/export": {
      "get": {
        "operationId": "v1.maintenance-scenarios.export",
        "tags": [
          "maintenance-scenarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-scenarios-export-200"
                },
                "example": {
                  "data": {
                    "format_version": 1,
                    "exported_at": "2026-11-04T09:00:00Z",
                    "fingerprint": "пример",
                    "scenario": {
                      "name": "Плановый осмотр",
                      "key": "demo_inspection",
                      "description": null,
                      "is_active": true,
                      "equipment_state_key": "demo_inspection",
                      "calculation_rules": [],
                      "custom_fields": [],
                      "checklist_items": [],
                      "device_type_names": []
                    }
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Экспорт схемы шаблона",
        "x-required-scopes": [
          "maintenance_scenarios:read"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/plan-visit": {
      "post": {
        "operationId": "v1.maintenance-schedules.plan-visit",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "planned_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "equipment_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "maintenance_schedule_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "expected_versions": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "equipment",
                            "maintenance-schedules"
                          ]
                        },
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "version": {
                          "type": "string",
                          "maxLength": 128,
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "billing_mode": {
                    "type": "string",
                    "enum": [
                      "billable",
                      "covered"
                    ]
                  },
                  "visit": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "starts_at": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                        "maxLength": 64
                      },
                      "ends_at": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                        "maxLength": 64
                      },
                      "crew_user_ids": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "address": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2000
                      },
                      "note": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 10000
                      },
                      "latitude": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": -90.0,
                        "maximum": 90.0
                      },
                      "longitude": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": -180.0,
                        "maximum": 180.0
                      },
                      "planning_duration_minutes": {
                        "type": "integer",
                        "minimum": 15,
                        "maximum": 10080
                      },
                      "client_window_start_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                        "maxLength": 64
                      },
                      "client_window_end_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                        "maxLength": 64
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "customer_id",
                  "workshop_id",
                  "planned_date",
                  "expected_versions"
                ],
                "oneOf": [
                  {
                    "required": [
                      "equipment_ids"
                    ],
                    "not": {
                      "required": [
                        "maintenance_schedule_ids"
                      ]
                    }
                  },
                  {
                    "required": [
                      "maintenance_schedule_ids"
                    ],
                    "not": {
                      "required": [
                        "equipment_ids"
                      ]
                    }
                  }
                ],
                "x-conditions": "Каждому выбранному объекту соответствует expected_versions. Для visit со временем обязательны starts_at, ends_at и crew_user_ids; координаты и клиентское окно передаются парами. Covered требует service_contract_id; billable не принимает его."
              },
              "example": {
                "customer_id": 101,
                "workshop_id": 101,
                "planned_date": "2026-11-04",
                "maintenance_schedule_ids": [
                  101
                ],
                "expected_versions": [
                  {
                    "type": "maintenance-schedules",
                    "id": 101,
                    "version": "1793782800"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-plan-visit-201"
                },
                "example": {
                  "data": {
                    "act_id": 101,
                    "visit_id": null,
                    "maintenance_schedule_ids": [],
                    "equipment_ids": []
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Общий акт ТО и необязательный выезд для выбранного парка/заявок",
        "x-required-scopes": [
          "maintenance_schedules:write",
          "acts:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение",
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/create-act": {
      "post": {
        "operationId": "v1.maintenance-schedules.create-act",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-acts-apply-kit-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "type": "repair",
                    "customer_id": 101,
                    "workshop_id": 101,
                    "stock_id": null,
                    "manager_id": null,
                    "technician_id": null,
                    "status_id": 101,
                    "device_type_id": null,
                    "manufacturer_id": null,
                    "model_name": null,
                    "serial_number": null,
                    "appearance": null,
                    "customer_note": null,
                    "is_warranty_case": true,
                    "previous_act_id": null,
                    "project_id": null,
                    "service_contract_id": null,
                    "defect_ids": [],
                    "device_part_ids": [],
                    "custom_fields": [],
                    "external_id": null,
                    "links": {
                      "edit": null,
                      "portal": null,
                      "public": null
                    },
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание или получение связанного акта ТО",
        "x-required-scopes": [
          "maintenance_schedules:write",
          "acts:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение",
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/update": {
      "post": {
        "operationId": "v1.maintenance-schedules.update",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "planned_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "preventive",
                      "corrective"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "deadline_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "title": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/start": {
      "post": {
        "operationId": "v1.maintenance-schedules.start",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Начало выполнения",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/reschedule": {
      "post": {
        "operationId": "v1.maintenance-schedules.reschedule",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "planned_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "planned_date"
                ]
              },
              "example": {
                "planned_date": "2026-11-04"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение даты и ответственного",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/execution": {
      "post": {
        "operationId": "v1.maintenance-schedules.execution",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "result": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "checklist": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "is_completed": {
                          "type": "boolean"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 10000
                        }
                      },
                      "required": [
                        "id",
                        "version"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "result"
                    ]
                  },
                  {
                    "required": [
                      "custom_fields"
                    ]
                  },
                  {
                    "required": [
                      "checklist"
                    ]
                  }
                ]
              },
              "example": {
                "result": "Осмотр выполнен"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Сохранение прогресса, результата и типизированных полей",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/complete": {
      "post": {
        "operationId": "v1.maintenance-schedules.complete",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "result": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Завершение только этой заявки",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/cancel": {
      "post": {
        "operationId": "v1.maintenance-schedules.cancel",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "reason"
                ]
              },
              "example": {
                "reason": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Отмена заявки с причиной",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/maintenance-schedules/{id}/reopen": {
      "post": {
        "operationId": "v1.maintenance-schedules.reopen",
        "tags": [
          "maintenance-schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "description": "Unix-секунды updated_at заявки ТО.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "reason"
                ]
              },
              "example": {
                "reason": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-maintenance-schedules-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "equipment_id": 101,
                    "title": "Плановый осмотр",
                    "description": null,
                    "type": "preventive",
                    "priority": "пример",
                    "planned_date": "пример",
                    "deadline_at": null,
                    "assigned_user_id": null,
                    "scenario_id": null,
                    "service_contract_id": null,
                    "workshop_id": null,
                    "status": "planned",
                    "completed_date": null,
                    "result": null,
                    "act_id": null,
                    "visit_id": null,
                    "maintenance_plan_id": null,
                    "custom_fields": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "preventive",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "406": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_ACCEPTABLE",
                    "message": "Недопустимое кодирование ответа"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Внутренняя ошибка, исход нужно уточнить"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Возврат заявки в работу",
        "x-required-scopes": [
          "maintenance_schedules:write"
        ],
        "x-required-permissions": [
          "ТОиР — Обслуживание → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference": {
      "get": {
        "operationId": "v1.reference.catalog",
        "tags": [
          "reference"
        ],
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-catalog-200"
                },
                "example": {
                  "data": {
                    "enums": [],
                    "resources": []
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Каталог доступных справочников и перечислений",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/enums/{name}": {
      "get": {
        "operationId": "v1.reference.enums.show",
        "tags": [
          "reference"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-enums-show-200"
                },
                "example": {
                  "data": {
                    "name": "Плановый осмотр",
                    "items": [
                      {
                        "value": 1,
                        "label": "пример",
                        "metadata": {}
                      }
                    ]
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Значения одного разрешённого системного перечисления",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/roles": {
      "get": {
        "operationId": "v1.reference.roles.index",
        "tags": [
          "reference"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-roles-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Список ролей для настройки доступа к статусам",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр",
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses": {
      "get": {
        "operationId": "v1.reference.statuses.index",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[act_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "shared",
                "repair",
                "installation",
                "maintenance"
              ]
            }
          },
          {
            "name": "filter[completes_act]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "color": "#2563eb",
                      "sort_order": 1,
                      "act_type": "repair",
                      "completes_act": true,
                      "accrues_wages": true,
                      "sla_days": null,
                      "requires_estimate_approval": true,
                      "pickup_reminder_days": null,
                      "next_status_ids": [],
                      "role_ids": [],
                      "user_ids": [],
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Список статусов с фильтром act_type",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.statuses.store",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^(?:#[a-fA-F0-9]{6}|[a-z][a-z0-9_-]{0,31})$",
                    "maxLength": 32
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "completes_act": {
                    "type": "boolean"
                  },
                  "accrues_wages": {
                    "type": "boolean"
                  },
                  "sla_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "requires_estimate_approval": {
                    "type": "boolean"
                  },
                  "pickup_reminder_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "act_type": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ActType"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "enum": [
                      "repair",
                      "installation",
                      "maintenance",
                      null
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "color",
                  "act_type"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "color": "#2563eb",
                "act_type": "repair"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "color": "#2563eb",
                    "sort_order": 1,
                    "act_type": "repair",
                    "completes_act": true,
                    "accrues_wages": true,
                    "sla_days": null,
                    "requires_estimate_approval": true,
                    "pickup_reminder_days": null,
                    "next_status_ids": [],
                    "role_ids": [],
                    "user_ids": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses/{id}": {
      "get": {
        "operationId": "v1.reference.statuses.show",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "color": "#2563eb",
                    "sort_order": 1,
                    "act_type": "repair",
                    "completes_act": true,
                    "accrues_wages": true,
                    "sla_days": null,
                    "requires_estimate_approval": true,
                    "pickup_reminder_days": null,
                    "next_status_ids": [],
                    "role_ids": [],
                    "user_ids": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Карточка статуса",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses/{id}/update": {
      "post": {
        "operationId": "v1.reference.statuses.update",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^(?:#[a-fA-F0-9]{6}|[a-z][a-z0-9_-]{0,31})$",
                    "maxLength": 32
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "completes_act": {
                    "type": "boolean"
                  },
                  "accrues_wages": {
                    "type": "boolean"
                  },
                  "sla_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "requires_estimate_approval": {
                    "type": "boolean"
                  },
                  "pickup_reminder_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 2147483647
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "color": "#2563eb",
                    "sort_order": 1,
                    "act_type": "repair",
                    "completes_act": true,
                    "accrues_wages": true,
                    "sla_days": null,
                    "requires_estimate_approval": true,
                    "pickup_reminder_days": null,
                    "next_status_ids": [],
                    "role_ids": [],
                    "user_ids": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Изменение настроек статуса",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses/{id}/transitions": {
      "post": {
        "operationId": "v1.reference.statuses.transitions",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "next_status_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "next_status_ids"
                ]
              },
              "example": {
                "next_status_ids": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "color": "#2563eb",
                    "sort_order": 1,
                    "act_type": "repair",
                    "completes_act": true,
                    "accrues_wages": true,
                    "sla_days": null,
                    "requires_estimate_approval": true,
                    "pickup_reminder_days": null,
                    "next_status_ids": [],
                    "role_ids": [],
                    "user_ids": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Настройка доступных следующих статусов",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses/{id}/access": {
      "post": {
        "operationId": "v1.reference.statuses.access",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "user_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "role_ids",
                  "user_ids"
                ]
              },
              "example": {
                "role_ids": [],
                "user_ids": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-statuses-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "color": "#2563eb",
                    "sort_order": 1,
                    "act_type": "repair",
                    "completes_act": true,
                    "accrues_wages": true,
                    "sla_days": null,
                    "requires_estimate_approval": true,
                    "pickup_reminder_days": null,
                    "next_status_ids": [],
                    "role_ids": [],
                    "user_ids": [],
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Настройка допуска ролей/сотрудников",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/statuses/{id}/delete": {
      "post": {
        "operationId": "v1.reference.statuses.destroy",
        "tags": [
          "statuses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Удаление только при допустимых зависимостях",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/users": {
      "get": {
        "operationId": "v1.users.index",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[workshop_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-users-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "workshop_id": 101,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Доступные сотрудники",
        "x-required-scopes": [
          "users:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/users/{id}": {
      "get": {
        "operationId": "v1.users.show",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-users-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "workshop_id": 101,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Карточка доступного сотрудника",
        "x-required-scopes": [
          "users:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/workshops": {
      "get": {
        "operationId": "v1.workshops.index",
        "tags": [
          "workshops"
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "filter[primary_process]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "repair",
                "installation",
                "maintenance"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-workshops-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "primary_process": "repair",
                      "city": "пример",
                      "address": "пример",
                      "phone": "+79990000001",
                      "hourly_rate": null,
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Список с фильтрами и пагинацией",
        "x-required-scopes": [
          "workshops:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.workshops.store",
        "tags": [
          "workshops"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "address": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "phone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "primary_process": {
                    "type": "string",
                    "description": "Основное направление мастерской: ремонт, техническое обслуживание, монтаж или продажи.",
                    "enum": [
                      "repair",
                      "maintenance",
                      "installation"
                    ]
                  },
                  "hourly_rate": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Ставка или null. amount содержит точное число дробных разрядов валюты организации, currency совпадает с GET /context.",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:hourly_rate"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:hourly_rate"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "city",
                  "address",
                  "phone"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "city": "пример",
                "address": "пример",
                "phone": "+79990000001"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-workshops-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "primary_process": "repair",
                    "city": "пример",
                    "address": "пример",
                    "phone": "+79990000001",
                    "hourly_rate": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Создание",
        "x-required-scopes": [
          "workshops:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/workshops/{id}": {
      "get": {
        "operationId": "v1.workshops.show",
        "tags": [
          "workshops"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-workshops-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "primary_process": "repair",
                    "city": "пример",
                    "address": "пример",
                    "phone": "+79990000001",
                    "hourly_rate": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "workshops:read"
        ],
        "x-required-permissions": [
          "Системные настройки → Базовый доступ к системе"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/workshops/{id}/update": {
      "post": {
        "operationId": "v1.workshops.update",
        "tags": [
          "workshops"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "address": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "phone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "primary_process": {
                    "type": "string",
                    "description": "Основное направление мастерской: ремонт, техническое обслуживание, монтаж или продажи.",
                    "enum": [
                      "repair",
                      "maintenance",
                      "installation"
                    ]
                  },
                  "hourly_rate": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Ставка или null. amount содержит точное число дробных разрядов валюты организации, currency совпадает с GET /context.",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:hourly_rate"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:hourly_rate"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-workshops-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "primary_process": "repair",
                    "city": "пример",
                    "address": "пример",
                    "phone": "+79990000001",
                    "hourly_rate": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "INVALID_JSON",
                    "message": "Некорректный запрос"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "workshops:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Информация о компании"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-types": {
      "get": {
        "operationId": "v1.reference.device-types.index",
        "tags": [
          "device-types"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.device-types.store",
        "tags": [
          "device-types"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-types/{id}": {
      "get": {
        "operationId": "v1.reference.device-types.show",
        "tags": [
          "device-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-types/{id}/update": {
      "post": {
        "operationId": "v1.reference.device-types.update",
        "tags": [
          "device-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-types/{id}/delete": {
      "post": {
        "operationId": "v1.reference.device-types.destroy",
        "tags": [
          "device-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/defects": {
      "get": {
        "operationId": "v1.reference.defects.index",
        "tags": [
          "defects"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.defects.store",
        "tags": [
          "defects"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/defects/{id}": {
      "get": {
        "operationId": "v1.reference.defects.show",
        "tags": [
          "defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/defects/{id}/update": {
      "post": {
        "operationId": "v1.reference.defects.update",
        "tags": [
          "defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/defects/{id}/delete": {
      "post": {
        "operationId": "v1.reference.defects.destroy",
        "tags": [
          "defects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-parts": {
      "get": {
        "operationId": "v1.reference.device-parts.index",
        "tags": [
          "device-parts"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[device_type_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.device-parts.store",
        "tags": [
          "device-parts"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-parts/{id}": {
      "get": {
        "operationId": "v1.reference.device-parts.show",
        "tags": [
          "device-parts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-parts/{id}/update": {
      "post": {
        "operationId": "v1.reference.device-parts.update",
        "tags": [
          "device-parts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/device-parts/{id}/delete": {
      "post": {
        "operationId": "v1.reference.device-parts.destroy",
        "tags": [
          "device-parts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/categories/{id}/update": {
      "post": {
        "operationId": "v1.reference.categories.update",
        "tags": [
          "categories"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "parent_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/categories/{id}/delete": {
      "post": {
        "operationId": "v1.reference.categories.destroy",
        "tags": [
          "categories"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/product-types/{id}/update": {
      "post": {
        "operationId": "v1.reference.product-types.update",
        "tags": [
          "product-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "device_type_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/product-types/{id}/delete": {
      "post": {
        "operationId": "v1.reference.product-types.destroy",
        "tags": [
          "product-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/properties/{id}/update": {
      "post": {
        "operationId": "v1.reference.properties.update",
        "tags": [
          "properties"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "product_type_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/properties/{id}/delete": {
      "post": {
        "operationId": "v1.reference.properties.destroy",
        "tags": [
          "properties"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/vendors/{id}/update": {
      "post": {
        "operationId": "v1.reference.vendors.update",
        "tags": [
          "vendors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "maxLength": 2048
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/vendors/{id}/delete": {
      "post": {
        "operationId": "v1.reference.vendors.destroy",
        "tags": [
          "vendors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/usage-units": {
      "get": {
        "operationId": "v1.reference.usage-units.index",
        "tags": [
          "usage-units"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.usage-units.store",
        "tags": [
          "usage-units"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "symbol"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "symbol": "пример"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/usage-units/{id}": {
      "get": {
        "operationId": "v1.reference.usage-units.show",
        "tags": [
          "usage-units"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/usage-units/{id}/update": {
      "post": {
        "operationId": "v1.reference.usage-units.update",
        "tags": [
          "usage-units"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/usage-units/{id}/delete": {
      "post": {
        "operationId": "v1.reference.usage-units.destroy",
        "tags": [
          "usage-units"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/places": {
      "get": {
        "operationId": "v1.reference.places.index",
        "tags": [
          "places"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[stock_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[is_active]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "enum": [
                "0",
                "1",
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.places.store",
        "tags": [
          "places"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "stock_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "rack_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "row_number": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "column_number": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "barcode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/places/{id}": {
      "get": {
        "operationId": "v1.reference.places.show",
        "tags": [
          "places"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/places/{id}/update": {
      "post": {
        "operationId": "v1.reference.places.update",
        "tags": [
          "places"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "stock_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "rack_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "row_number": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "column_number": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "barcode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/places/{id}/delete": {
      "post": {
        "operationId": "v1.reference.places.destroy",
        "tags": [
          "places"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/markups": {
      "get": {
        "operationId": "v1.reference.markups.index",
        "tags": [
          "markups"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[calculation_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "fixed",
                "percentage"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.markups.store",
        "tags": [
          "markups"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "calculation_type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "percentage"
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "calculation_type",
                  "value"
                ]
              },
              "example": {
                "name": "Плановый осмотр",
                "calculation_type": "fixed",
                "value": {
                  "amount": "1.00",
                  "currency": "RUB"
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/markups/{id}": {
      "get": {
        "operationId": "v1.reference.markups.show",
        "tags": [
          "markups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/markups/{id}/update": {
      "post": {
        "operationId": "v1.reference.markups.update",
        "tags": [
          "markups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "calculation_type": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "percentage"
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/markups/{id}/delete": {
      "post": {
        "operationId": "v1.reference.markups.destroy",
        "tags": [
          "markups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/money-types": {
      "get": {
        "operationId": "v1.reference.money-types.index",
        "tags": [
          "money-types"
        ],
        "parameters": [
          {
            "name": "filter[q]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[group]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "filter[direction]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "income",
                "expense",
                "transfer"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Список",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.reference.money-types.store",
        "tags": [
          "money-types"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "group": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "direction": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "income",
                      "expense",
                      "transfer",
                      null
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание записи",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/money-types/{id}": {
      "get": {
        "operationId": "v1.reference.money-types.show",
        "tags": [
          "money-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-device-types-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Карточка",
        "x-required-scopes": [
          "reference:read"
        ],
        "x-required-permissions": [
          "Справочники → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/money-types/{id}/update": {
      "post": {
        "operationId": "v1.reference.money-types.update",
        "tags": [
          "money-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "group": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "direction": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "income",
                      "expense",
                      "transfer",
                      null
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "name": "Плановый осмотр"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-reference-categories-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "name": "Плановый осмотр",
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение",
        "x-required-scopes": [
          "reference:write"
        ],
        "x-required-permissions": [
          "Справочники → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/reference/money-types/{id}/delete": {
      "post": {
        "operationId": "v1.reference.money-types.destroy",
        "tags": [
          "money-types"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление при отсутствии запрещённых зависимостей",
        "x-required-scopes": [
          "reference:delete"
        ],
        "x-required-permissions": [
          "Справочники → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{contract_id}/charges": {
      "get": {
        "operationId": "v1.service-contract-charges.index",
        "tags": [
          "service-contract-charges"
        ],
        "parameters": [
          {
            "name": "contract_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          },
          {
            "name": "filter[period_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[period_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[is_paid]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contract-charges-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "service_contract_id": 101,
                      "period_date": "пример",
                      "amount": {
                        "amount": "1.00",
                        "currency": "RUB"
                      },
                      "is_paid": true
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Начисления договора",
        "x-required-scopes": [
          "service_contract_charges:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр",
          "Деньги → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{contract_id}/charges/{id}": {
      "get": {
        "operationId": "v1.service-contract-charges.show",
        "tags": [
          "service-contract-charges"
        ],
        "parameters": [
          {
            "name": "contract_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contract-charges-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "service_contract_id": 101,
                    "period_date": "пример",
                    "amount": {
                      "amount": "1.00",
                      "currency": "RUB"
                    },
                    "is_paid": true
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Начисление за период",
        "x-required-scopes": [
          "service_contract_charges:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр",
          "Деньги → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{id}/update": {
      "post": {
        "operationId": "v1.service-contracts.update",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "number": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "billing_period": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      "yearly"
                    ]
                  },
                  "fee": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,9})(?:\\.[0-9]{1,4})?$",
                        "x-validation": [
                          "required_with:fee"
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "x-validation": [
                          "required_with:fee"
                        ]
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "additionalProperties": false
                  },
                  "reaction_hours": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "resolution_hours": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "discount_operations": {
                    "type": "number",
                    "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,2})?$",
                    "minLength": 0,
                    "maxLength": 100,
                    "minimum": 0.0,
                    "maximum": 100.0
                  },
                  "discount_products": {
                    "type": "number",
                    "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,2})?$",
                    "minLength": 0,
                    "maxLength": 100,
                    "minimum": 0.0,
                    "maximum": 100.0
                  },
                  "start_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "end_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "maintenance_interval_days": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 4294967295
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "customer_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": null,
                    "title": null,
                    "customer_id": null,
                    "customer_site_id": null,
                    "workshop_id": null,
                    "status": "draft",
                    "billing_period": "monthly",
                    "reaction_hours": null,
                    "resolution_hours": null,
                    "start_date": null,
                    "end_date": null,
                    "equipment_ids": [],
                    "next_maintenance_date": null,
                    "maintenance_interval_days": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение разрешённых полей",
        "x-required-scopes": [
          "service_contracts:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение",
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{id}/equipment": {
      "post": {
        "operationId": "v1.service-contracts.equipment.set",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "equipment_ids"
                ]
              },
              "example": {
                "equipment_ids": [
                  101
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": null,
                    "title": null,
                    "customer_id": null,
                    "customer_site_id": null,
                    "workshop_id": null,
                    "status": "draft",
                    "billing_period": "monthly",
                    "reaction_hours": null,
                    "resolution_hours": null,
                    "start_date": null,
                    "end_date": null,
                    "equipment_ids": [],
                    "next_maintenance_date": null,
                    "maintenance_interval_days": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Установка согласованного состава оборудования",
        "x-required-scopes": [
          "service_contracts:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение",
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "get": {
        "operationId": "v1.service-contracts.equipment.index",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-equipment-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "customer_id": 101,
                      "customer_site_id": null,
                      "equipment_model_id": null,
                      "manufacturer_id": null,
                      "device_type_id": null,
                      "model_name": null,
                      "serial_number": null,
                      "inventory_number": null,
                      "manufacture_date": null,
                      "installation_date": null,
                      "warranty_expires_at": null,
                      "catalog_product_id": null,
                      "location": null,
                      "technical_specs": null,
                      "status": "active",
                      "last_maintenance_date": null,
                      "next_maintenance_date": null,
                      "usage_reading": 1,
                      "usage_unit_id": null,
                      "maintenance_interval": null,
                      "note": null,
                      "custom_fields": [],
                      "external_id": null,
                      "links": {
                        "edit": null,
                        "portal": null,
                        "public": null
                      },
                      "version": "1793782800",
                      "updated_at": null
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Запись не найдена",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "CURSOR_EXPIRED",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Состав обслуживаемых единиц",
        "x-required-scopes": [
          "service_contracts:read"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/service-contracts/{id}/status": {
      "post": {
        "operationId": "v1.service-contracts.status",
        "tags": [
          "service-contracts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "suspended",
                      "ended"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status"
                ]
              },
              "example": {
                "status": "draft"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-service-contracts-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": null,
                    "title": null,
                    "customer_id": null,
                    "customer_site_id": null,
                    "workshop_id": null,
                    "status": "draft",
                    "billing_period": "monthly",
                    "reaction_hours": null,
                    "resolution_hours": null,
                    "start_date": null,
                    "end_date": null,
                    "equipment_ids": [],
                    "next_maintenance_date": null,
                    "maintenance_interval_days": null,
                    "note": null,
                    "version": "1793782800",
                    "updated_at": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Изменение состояния договора",
        "x-required-scopes": [
          "service_contracts:write"
        ],
        "x-required-permissions": [
          "Клиенты и поставщики → Изменение",
          "Клиенты и поставщики → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/users/{user_id}/availability": {
      "get": {
        "operationId": "v1.user-availability.show",
        "tags": [
          "user-availability"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filter[to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-user-availability-show-200"
                },
                "example": {
                  "data": {
                    "windows": [],
                    "days_off": [],
                    "timezone": "Europe/Moscow",
                    "version": "1793782800"
                  },
                  "meta": {
                    "period": {
                      "from": "пример",
                      "to": "пример"
                    }
                  }
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Недельные окна и исключения выбранного периода",
        "x-required-scopes": [
          "user_availability:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.user-availability.save",
        "tags": [
          "user-availability"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "windows": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "weekday": {
                          "type": "integer",
                          "minimum": 1.0,
                          "maximum": 7.0
                        },
                        "starts_at": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                        },
                        "ends_at": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                        }
                      },
                      "required": [
                        "weekday",
                        "starts_at",
                        "ends_at"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "windows"
                ]
              },
              "example": {
                "windows": [
                  {
                    "weekday": 3,
                    "starts_at": "09:00",
                    "ends_at": "18:00"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-user-availability-save-200"
                },
                "example": {
                  "data": {
                    "windows": [],
                    "days_off": [],
                    "timezone": "Europe/Moscow",
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Сохранение явного набора недельных окон",
        "x-required-scopes": [
          "user_availability:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Пользователи"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/users/{user_id}/days-off": {
      "post": {
        "operationId": "v1.user-availability.day-off.store",
        "tags": [
          "user-availability"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                },
                "additionalProperties": false,
                "required": [
                  "date"
                ]
              },
              "example": {
                "date": "2026-11-04"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-user-availability-day-off-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "date": "пример",
                    "reason": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Добавление выходного",
        "x-required-scopes": [
          "user_availability:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Пользователи"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/users/{user_id}/days-off/{id}/delete": {
      "post": {
        "operationId": "v1.user-availability.day-off.delete",
        "tags": [
          "user-availability"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление конкретного выходного",
        "x-required-scopes": [
          "user_availability:write"
        ],
        "x-required-permissions": [
          "Системные настройки → Пользователи"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/events": {
      "get": {
        "operationId": "v1.visit-events.index",
        "tags": [
          "visit-events"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-events-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "type": "en_route",
                      "occurred_at": "2026-11-04T09:00:00Z",
                      "user_id": 101
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "История доступных событий",
        "x-required-scopes": [
          "visit_events:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/en-route": {
      "post": {
        "operationId": "v1.visit-events.en-route",
        "tags": [
          "visit-events"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-events-en-route-200"
                },
                "example": {
                  "data": {
                    "event": null,
                    "act_id": 101,
                    "act_status": {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "completes_act": true
                    },
                    "visit_state": "planned",
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Сотрудник выехал",
        "x-required-scopes": [
          "visit_events:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/arrive": {
      "post": {
        "operationId": "v1.visit-events.arrive",
        "tags": [
          "visit-events"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-events-en-route-200"
                },
                "example": {
                  "data": {
                    "event": null,
                    "act_id": 101,
                    "act_status": {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "completes_act": true
                    },
                    "visit_state": "planned",
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Сотрудник прибыл",
        "x-required-scopes": [
          "visit_events:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/complete": {
      "post": {
        "operationId": "v1.visit-events.complete",
        "tags": [
          "visit-events"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "status_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status_id"
                ]
              },
              "example": {
                "status_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-events-en-route-200"
                },
                "example": {
                  "data": {
                    "event": null,
                    "act_id": 101,
                    "act_status": {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "completes_act": true
                    },
                    "visit_state": "planned",
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Завершение по допустимому закрывающему статусу акта",
        "x-required-scopes": [
          "visit_events:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/reopen": {
      "post": {
        "operationId": "v1.visit-events.reopen",
        "tags": [
          "visit-events"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "status_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "status_id"
                ]
              },
              "example": {
                "status_id": 101
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-events-en-route-200"
                },
                "example": {
                  "data": {
                    "event": null,
                    "act_id": 101,
                    "act_status": {
                      "id": 101,
                      "name": "Плановый осмотр",
                      "completes_act": true
                    },
                    "visit_state": "planned",
                    "changed": true
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          }
        },
        "summary": "Открытие акта и связанного выполнения по допустимому статусу",
        "x-required-scopes": [
          "visit_events:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/media": {
      "get": {
        "operationId": "v1.visit-media.index",
        "tags": [
          "visit-media"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "filter[kind]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "photo",
                "attachment"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id"
              ]
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "page[cursor]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8192
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-media-index-200"
                },
                "example": {
                  "data": [
                    {
                      "id": 101,
                      "visit_id": 101,
                      "kind": "attachment",
                      "filename": "attachment.pdf",
                      "mime_type": "application/pdf",
                      "size": 1,
                      "created_at": null,
                      "version": "1793782800",
                      "download_url": "https://organization.example/"
                    }
                  ],
                  "links": {
                    "self": "/api/v1/customers",
                    "next": null,
                    "prev": null
                  },
                  "meta": {
                    "per_page": 1,
                    "has_more": false,
                    "next_cursor": null,
                    "server_time": "2026-11-04T09:00:00Z"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Метаданные доступных файлов",
        "x-required-scopes": [
          "visit_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      },
      "post": {
        "operationId": "v1.visit-media.store",
        "tags": [
          "visit-media"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "photo",
                      "attachment"
                    ]
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Файл от 1 до 10 МиБ включительно; MIME проверяется по содержимому."
                  },
                  "client_filename": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "required": [
                  "kind",
                  "file"
                ]
              },
              "example": {
                "kind": "attachment",
                "file": "FILE_BYTES"
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-media-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "visit_id": 101,
                    "kind": "attachment",
                    "filename": "attachment.pdf",
                    "mime_type": "application/pdf",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-media-store-202"
                },
                "example": {
                  "data": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "state": "processing"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "PAYLOAD_TOO_LARGE",
                    "message": "Превышен размер"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "UNSUPPORTED_MEDIA_TYPE",
                    "message": "Неподдерживаемый Content-Type"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Загрузка multipart/form-data",
        "x-required-scopes": [
          "visit_media:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Системные настройки → Загрузка вложений"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/media/{id}": {
      "get": {
        "operationId": "v1.visit-media.show",
        "tags": [
          "visit-media"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-media-show-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "visit_id": 101,
                    "kind": "attachment",
                    "filename": "attachment.pdf",
                    "mime_type": "application/pdf",
                    "size": 1,
                    "created_at": null,
                    "version": "1793782800",
                    "download_url": "https://organization.example/"
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Метаданные одного файла и версия для удаления",
        "x-required-scopes": [
          "visit_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/media/{id}/download": {
      "get": {
        "operationId": "v1.visit-media.download",
        "tags": [
          "visit-media"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Защищённое получение содержимого",
        "x-required-scopes": [
          "visit_media:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{visit_id}/media/{id}/delete": {
      "post": {
        "operationId": "v1.visit-media.destroy",
        "tags": [
          "visit-media"
        ],
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Удаление разрешённого вложения",
        "x-required-scopes": [
          "visit_media:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visit-route-plans": {
      "post": {
        "operationId": "v1.visit-route-plans.create",
        "tags": [
          "visit-route-plans"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "workshop_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "optimize",
                      "distribute"
                    ]
                  },
                  "work_start": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "work_end": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
                    "x-validation": [
                      "after:work_start"
                    ]
                  },
                  "user_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "visit_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "return_to_workshop": {
                    "type": "boolean"
                  },
                  "budget": {
                    "type": "object",
                    "properties": {
                      "max_requests": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000
                      },
                      "max_matrix_pairs": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      }
                    },
                    "required": [
                      "max_requests",
                      "max_matrix_pairs"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "date",
                  "workshop_id",
                  "mode",
                  "work_start",
                  "work_end",
                  "user_ids",
                  "visit_ids",
                  "budget"
                ]
              },
              "example": {
                "date": "2026-11-04",
                "workshop_id": 101,
                "mode": "optimize",
                "work_start": "09:00",
                "work_end": "18:00",
                "user_ids": [
                  101
                ],
                "visit_ids": [
                  101
                ],
                "budget": {
                  "max_requests": 20,
                  "max_matrix_pairs": 100
                }
              }
            }
          }
        },
        "responses": {
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Создание серверного расчёта с явным бюджетом",
        "x-required-scopes": [
          "visit_route_plans:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visit-route-plans/{id}": {
      "get": {
        "operationId": "v1.visit-route-plans.show",
        "tags": [
          "visit-route-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "304": {
            "description": "",
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-show-200"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {}
                }
              }
            },
            "headers": {
              "ETag": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Текущее состояние и предложение",
        "x-required-scopes": [
          "visit_route_plans:read"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visit-route-plans/{id}/cancel": {
      "post": {
        "operationId": "v1.visit-route-plans.cancel",
        "tags": [
          "visit-route-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Остановка незавершённого расчёта",
        "x-required-scopes": [
          "visit_route_plans:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visit-route-plans/{id}/advance": {
      "post": {
        "operationId": "v1.visit-route-plans.advance",
        "tags": [
          "visit-route-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-advance-202"
                },
                "example": {
                  "data": {
                    "state": "processing",
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Продолжение ограниченного шага расчёта",
        "x-required-scopes": [
          "visit_route_plans:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visit-route-plans/{id}/apply": {
      "post": {
        "operationId": "v1.visit-route-plans.apply",
        "tags": [
          "visit-route-plans"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12})$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visit-route-plans-create-201"
                },
                "example": {
                  "data": {
                    "id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "date": "пример",
                    "workshop_id": 101,
                    "user_ids": [],
                    "visit_ids": [],
                    "mode": "пример",
                    "work_start": "09:00",
                    "work_end": "18:00",
                    "return_to_workshop": true,
                    "status": "processing",
                    "progress": {
                      "completed_steps": 1,
                      "total_steps": 1
                    },
                    "preview": null,
                    "version": "1793782800",
                    "source_version": "1793782800",
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "budget": {
                      "max_requests": 1,
                      "max_matrix_pairs": 1
                    },
                    "usage": {
                      "requests": 1,
                      "matrix_pairs": 1
                    },
                    "error": null
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Применение актуального предложения",
        "x-required-scopes": [
          "visit_route_plans:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение",
          "Акты приёма оборудования → Просмотр"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}/update": {
      "post": {
        "operationId": "v1.visits.update",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1
                  },
                  "planning_duration_minutes": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 10080
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 10000
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90.0,
                    "maximum": 90.0
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180.0,
                    "maximum": 180.0
                  },
                  "client_window_start_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "client_window_end_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "custom_fields": {
                    "type": "array",
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "customer_site_id": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          }
        },
        "summary": "Изменение адреса, примечаний и клиентского окна",
        "x-required-scopes": [
          "visits:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}/schedule": {
      "post": {
        "operationId": "v1.visits.schedule",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "crew_user_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})$",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false,
                "required": [
                  "crew_user_ids",
                  "starts_at",
                  "ends_at"
                ]
              },
              "example": {
                "crew_user_ids": [
                  101
                ],
                "starts_at": "2026-11-04T10:00:00+03:00",
                "ends_at": "2026-11-04T11:00:00+03:00"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          }
        },
        "summary": "Назначение или перенос времени и бригады",
        "x-required-scopes": [
          "visits:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}/assign": {
      "post": {
        "operationId": "v1.visits.assign",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "crew_user_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "crew_user_ids"
                ]
              },
              "example": {
                "crew_user_ids": [
                  101
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          }
        },
        "summary": "Изменение состава бригады",
        "x-required-scopes": [
          "visits:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}/unschedule": {
      "post": {
        "operationId": "v1.visits.unschedule",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-visits-store-201"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "number": "пример",
                    "act_id": 101,
                    "customer_id": 101,
                    "workshop_id": 101,
                    "customer_site_id": null,
                    "starts_at": null,
                    "ends_at": null,
                    "crew_user_ids": [],
                    "client_window_start_at": null,
                    "client_window_end_at": null,
                    "planning_duration_minutes": null,
                    "duration_minutes": null,
                    "address": null,
                    "latitude": null,
                    "longitude": null,
                    "note": null,
                    "state": "planned",
                    "custom_fields": [],
                    "version": "1793782800"
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          }
        },
        "summary": "Снятие назначения с сохранением акта и заявок",
        "x-required-scopes": [
          "visits:write"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Изменение"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    },
    "/visits/{id}/delete": {
      "post": {
        "operationId": "v1.visits.destroy",
        "tags": [
          "visits"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]+)$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          },
          {
            "name": "If-Resource-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._~-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Response_v1-act-operations-delete-200"
                },
                "example": {
                  "data": {
                    "id": 101,
                    "deleted": false
                  },
                  "meta": {
                    "operation_id": "ef62763b-87f9-4c90-83bb-e919f3c8e111",
                    "affected_resources": [
                      {
                        "type": "customers",
                        "id": 101,
                        "version": "1793782800",
                        "deleted": false
                      }
                    ],
                    "warnings": []
                  }
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "required": true,
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "required": false,
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Ошибка входных данных",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "Ошибка входных данных"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Ошибка авторизации",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Недостаточно допуска"
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "TOKEN_INVALID",
                    "message": "Требуется действующий Bearer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Не найдено или недоступно"
                  }
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "IDEMPOTENCY_CONFLICT",
                    "message": "Конфликт состояния или повтора"
                  }
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_MISMATCH",
                    "message": "Версия устарела"
                  }
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "Лимит запросов, Retry-After"
                  }
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "Временно недоступно"
                  }
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "error": {
                    "code": "VERSION_REQUIRED",
                    "message": "Нужно предусловие версии"
                  }
                }
              }
            }
          }
        },
        "summary": "Удаление только допустимого выезда без уничтожения истории актов",
        "x-required-scopes": [
          "visits:delete"
        ],
        "x-required-permissions": [
          "Акты приёма оборудования → Удаление"
        ],
        "description": "Требуется текущий доступ к организации, мастерской и записям. Условия доступа к полям и составным командам см. в описании ресурса."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "http": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "ActType": {
        "type": "string",
        "description": "Тип акта: ремонт, монтаж или техническое обслуживание.",
        "enum": [
          "repair",
          "installation",
          "maintenance"
        ],
        "title": "Тип акта"
      },
      "ProductAssetType": {
        "type": "string",
        "enum": [
          "equipment",
          "component",
          "license",
          "certificate"
        ],
        "title": "Тип оснащения"
      },
      "Response_v1-acts-apply-kit-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "repair",
                  "installation",
                  "maintenance"
                ]
              },
              "customer_id": {
                "type": "integer"
              },
              "workshop_id": {
                "type": "integer"
              },
              "stock_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manager_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "technician_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status_id": {
                "type": "integer"
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "model_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "appearance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_warranty_case": {
                "type": "boolean"
              },
              "previous_act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "project_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "defect_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "device_part_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "internal_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "type",
              "customer_id",
              "workshop_id",
              "stock_id",
              "manager_id",
              "technician_id",
              "status_id",
              "device_type_id",
              "manufacturer_id",
              "model_name",
              "serial_number",
              "appearance",
              "customer_note",
              "is_warranty_case",
              "previous_act_id",
              "project_id",
              "service_contract_id",
              "defect_ids",
              "device_part_ids",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "fields": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "details": {
                "type": "object"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Response_v1-act-equipment-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "equipment": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "customer_id": {
                      "type": "integer"
                    },
                    "customer_site_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "equipment_model_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "manufacturer_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "device_type_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "model_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "serial_number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "inventory_number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "manufacture_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "installation_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "warranty_expires_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "catalog_product_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "location": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "technical_specs": {
                      "type": [
                        "object",
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "last_maintenance_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "next_maintenance_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "usage_reading": {
                      "type": "integer"
                    },
                    "usage_unit_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "maintenance_interval": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "custom_fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field_id": {
                            "type": "integer"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "amount": {
                                    "type": "string"
                                  },
                                  "currency": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "field_id",
                          "value"
                        ]
                      }
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "edit": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "portal": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "public": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "edit",
                        "portal",
                        "public"
                      ]
                    },
                    "version": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "customer_id",
                    "customer_site_id",
                    "equipment_model_id",
                    "manufacturer_id",
                    "device_type_id",
                    "model_name",
                    "serial_number",
                    "inventory_number",
                    "manufacture_date",
                    "installation_date",
                    "warranty_expires_at",
                    "catalog_product_id",
                    "location",
                    "technical_specs",
                    "status",
                    "last_maintenance_date",
                    "next_maintenance_date",
                    "usage_reading",
                    "usage_unit_id",
                    "maintenance_interval",
                    "note",
                    "custom_fields",
                    "external_id",
                    "links",
                    "version",
                    "updated_at"
                  ]
                },
                "act_product_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maintenance_schedules": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "status": {
                        "type": "string"
                      },
                      "checklist": {
                        "type": "object",
                        "properties": {
                          "completed": {
                            "type": "integer"
                          },
                          "total": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "completed",
                          "total"
                        ]
                      },
                      "version": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "status",
                      "checklist",
                      "version"
                    ]
                  }
                }
              },
              "required": [
                "equipment",
                "act_product_id",
                "maintenance_schedules"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-act-equipment-store-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "maintenance_schedule_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "act_product_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            },
            "required": [
              "equipment_ids",
              "maintenance_schedule_ids",
              "act_product_ids"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-operations-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "operation_id": {
                  "type": "integer"
                },
                "quantity": {
                  "type": "string"
                },
                "unit_id": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "discount": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "assigned_user_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "maintenance_schedule_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "equipment_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "operation_id",
                "quantity",
                "unit_id",
                "unit_price",
                "discount",
                "note",
                "assigned_user_ids",
                "maintenance_schedule_id",
                "equipment_id",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-act-operations-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "operation_id": {
                "type": "integer"
              },
              "quantity": {
                "type": "string"
              },
              "unit_id": {
                "type": "integer"
              },
              "unit_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assigned_user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "quantity",
              "unit_id",
              "unit_price",
              "discount",
              "note",
              "assigned_user_ids",
              "maintenance_schedule_id",
              "equipment_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-operations-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "operation_id": {
                "type": "integer"
              },
              "quantity": {
                "type": "string"
              },
              "unit_id": {
                "type": "integer"
              },
              "unit_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assigned_user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "quantity",
              "unit_id",
              "unit_price",
              "discount",
              "note",
              "assigned_user_ids",
              "maintenance_schedule_id",
              "equipment_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-operations-delete-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "deleted": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "deleted"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-products-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "product_id": {
                  "type": "integer"
                },
                "quantity": {
                  "type": "string"
                },
                "unit_id": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "discount": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "markup_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "maintenance_schedule_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "equipment_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reservation_state": {
                  "type": "string"
                },
                "inventory_effect": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "reserved_quantity": {
                      "type": "string"
                    },
                    "written_off_quantity": {
                      "type": "string"
                    },
                    "shortage_quantity": {
                      "type": "string"
                    },
                    "requires_reconciliation": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "mode",
                    "reserved_quantity",
                    "written_off_quantity",
                    "shortage_quantity",
                    "requires_reconciliation"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "product_id",
                "quantity",
                "unit_id",
                "unit_price",
                "discount",
                "markup_id",
                "serial_number",
                "note",
                "maintenance_schedule_id",
                "equipment_id",
                "reservation_state",
                "inventory_effect",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-act-products-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "product_id": {
                "type": "integer"
              },
              "quantity": {
                "type": "string"
              },
              "unit_id": {
                "type": "integer"
              },
              "unit_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "markup_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reservation_state": {
                "type": "string"
              },
              "inventory_effect": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string"
                  },
                  "reserved_quantity": {
                    "type": "string"
                  },
                  "written_off_quantity": {
                    "type": "string"
                  },
                  "shortage_quantity": {
                    "type": "string"
                  },
                  "requires_reconciliation": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "mode",
                  "reserved_quantity",
                  "written_off_quantity",
                  "shortage_quantity",
                  "requires_reconciliation"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "product_id",
              "quantity",
              "unit_id",
              "unit_price",
              "discount",
              "markup_id",
              "serial_number",
              "note",
              "maintenance_schedule_id",
              "equipment_id",
              "reservation_state",
              "inventory_effect",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-products-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "product_id": {
                "type": "integer"
              },
              "quantity": {
                "type": "string"
              },
              "unit_id": {
                "type": "integer"
              },
              "unit_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "markup_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reservation_state": {
                "type": "string"
              },
              "inventory_effect": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string"
                  },
                  "reserved_quantity": {
                    "type": "string"
                  },
                  "written_off_quantity": {
                    "type": "string"
                  },
                  "shortage_quantity": {
                    "type": "string"
                  },
                  "requires_reconciliation": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "mode",
                  "reserved_quantity",
                  "written_off_quantity",
                  "shortage_quantity",
                  "requires_reconciliation"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "product_id",
              "quantity",
              "unit_id",
              "unit_price",
              "discount",
              "markup_id",
              "serial_number",
              "note",
              "maintenance_schedule_id",
              "equipment_id",
              "reservation_state",
              "inventory_effect",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-media-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "act_id": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "const": "attachment"
                },
                "filename": {
                  "type": "string"
                },
                "mime_type": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "download_url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "act_id",
                "kind",
                "filename",
                "mime_type",
                "size",
                "created_at",
                "version",
                "download_url"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-act-media-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "act_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "const": "attachment"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "act_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-media-store-202": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "const": "processing"
              }
            },
            "required": [
              "operation_id",
              "state"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-act-media-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "act_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "const": "attachment"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "act_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-acts-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "number": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "repair",
                    "installation",
                    "maintenance"
                  ]
                },
                "customer_id": {
                  "type": "integer"
                },
                "workshop_id": {
                  "type": "integer"
                },
                "stock_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "manager_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "technician_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status_id": {
                  "type": "integer"
                },
                "device_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "manufacturer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "model_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "appearance": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "customer_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_warranty_case": {
                  "type": "boolean"
                },
                "previous_act_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "project_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "service_contract_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "defect_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "device_part_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field_id",
                      "value"
                    ]
                  }
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "edit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "portal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "edit",
                    "portal",
                    "public"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "internal_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "result": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "type",
                "customer_id",
                "workshop_id",
                "stock_id",
                "manager_id",
                "technician_id",
                "status_id",
                "device_type_id",
                "manufacturer_id",
                "model_name",
                "serial_number",
                "appearance",
                "customer_note",
                "is_warranty_case",
                "previous_act_id",
                "project_id",
                "service_contract_id",
                "defect_ids",
                "device_part_ids",
                "custom_fields",
                "external_id",
                "links",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-acts-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "repair",
                  "installation",
                  "maintenance"
                ]
              },
              "customer_id": {
                "type": "integer"
              },
              "workshop_id": {
                "type": "integer"
              },
              "stock_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manager_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "technician_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status_id": {
                "type": "integer"
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "model_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "appearance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_warranty_case": {
                "type": "boolean"
              },
              "previous_act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "project_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "defect_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "device_part_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "internal_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "type",
              "customer_id",
              "workshop_id",
              "stock_id",
              "manager_id",
              "technician_id",
              "status_id",
              "device_type_id",
              "manufacturer_id",
              "model_name",
              "serial_number",
              "appearance",
              "customer_note",
              "is_warranty_case",
              "previous_act_id",
              "project_id",
              "service_contract_id",
              "defect_ids",
              "device_part_ids",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-operations-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "processing",
                    "succeeded",
                    "failed",
                    "needs_reconciliation"
                  ]
                },
                "method": {
                  "type": "string",
                  "const": "POST"
                },
                "path": {
                  "type": "string"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_refs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "id": {
                        "type": [
                          "integer",
                          "string"
                        ]
                      },
                      "version": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "deleted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ]
                  }
                },
                "error": {
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "response_available": {
                  "type": "boolean"
                },
                "http_status": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "response": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "id": {
                        "type": "integer"
                      },
                      "state": {
                        "type": "string"
                      },
                      "error": {
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "id",
                      "state",
                      "error"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "state",
                "method",
                "path",
                "created_at",
                "completed_at",
                "resource_refs",
                "error",
                "response_available",
                "http_status",
                "response"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              },
              "period": {
                "type": "object",
                "properties": {
                  "created_from": {
                    "type": "string"
                  },
                  "created_to": {
                    "type": "string"
                  }
                },
                "required": [
                  "created_from",
                  "created_to"
                ]
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time",
              "period"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-operations-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "processing",
                  "succeeded",
                  "failed",
                  "needs_reconciliation"
                ]
              },
              "method": {
                "type": "string",
                "const": "POST"
              },
              "path": {
                "type": "string"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_refs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id"
                  ]
                }
              },
              "error": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "response_available": {
                "type": "boolean"
              },
              "http_status": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "response": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "data": {
                    "type": "object"
                  },
                  "meta": {
                    "type": "object"
                  }
                },
                "required": [
                  "data",
                  "meta"
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": "integer"
                    },
                    "state": {
                      "type": "string"
                    },
                    "error": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "state",
                    "error"
                  ]
                }
              }
            },
            "required": [
              "id",
              "state",
              "method",
              "path",
              "created_at",
              "completed_at",
              "resource_refs",
              "error",
              "response_available",
              "http_status",
              "response"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-catalog-operations-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "pricing_type": {
                "type": "string",
                "enum": [
                  "fixed",
                  "hourly"
                ]
              },
              "fixed_price": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "labor_hours": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hourly_rate": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "calculated_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "category_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "estimated_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "warranty": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "archived": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "pricing_type",
              "fixed_price",
              "labor_hours",
              "hourly_rate",
              "calculated_price",
              "workshop_id",
              "category_id",
              "estimated_minutes",
              "tax",
              "warranty",
              "description",
              "archived",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-catalog-operations-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "pricing_type": {
                  "type": "string",
                  "enum": [
                    "fixed",
                    "hourly"
                  ]
                },
                "fixed_price": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "labor_hours": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hourly_rate": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "calculated_price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "workshop_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "category_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "estimated_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "tax": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "warranty": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "archived": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "pricing_type",
                "fixed_price",
                "labor_hours",
                "hourly_rate",
                "calculated_price",
                "workshop_id",
                "category_id",
                "estimated_minutes",
                "tax",
                "warranty",
                "description",
                "archived",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-catalog-operations-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "pricing_type": {
                "type": "string",
                "enum": [
                  "fixed",
                  "hourly"
                ]
              },
              "fixed_price": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "labor_hours": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hourly_rate": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "calculated_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "category_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "estimated_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "warranty": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "archived": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "pricing_type",
              "fixed_price",
              "labor_hours",
              "hourly_rate",
              "calculated_price",
              "workshop_id",
              "category_id",
              "estimated_minutes",
              "tax",
              "warranty",
              "description",
              "archived",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-catalog-products-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacturer_sku": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "barcode_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "category_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sale_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "purchase_price": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "warranty": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "discontinued": {
                "type": "boolean"
              },
              "is_serial_tracked": {
                "type": "boolean"
              },
              "requires_marking": {
                "type": "boolean"
              },
              "asset_tracking_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "property_id": {
                      "type": "integer"
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "property_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "archived": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "sku",
              "manufacturer_sku",
              "barcode",
              "barcode_type_id",
              "manufacturer_id",
              "product_type_id",
              "category_id",
              "sale_price",
              "description",
              "warranty",
              "tax",
              "discontinued",
              "is_serial_tracked",
              "requires_marking",
              "asset_tracking_type",
              "properties",
              "external_id",
              "archived",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-products-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufacturer_sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "barcode_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "manufacturer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "category_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sale_price": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "purchase_price": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "warranty": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tax": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "discontinued": {
                  "type": "boolean"
                },
                "is_serial_tracked": {
                  "type": "boolean"
                },
                "requires_marking": {
                  "type": "boolean"
                },
                "asset_tracking_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "properties": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "property_id": {
                        "type": "integer"
                      },
                      "value": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "property_id",
                      "value"
                    ]
                  }
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "archived": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "sku",
                "manufacturer_sku",
                "barcode",
                "barcode_type_id",
                "manufacturer_id",
                "product_type_id",
                "category_id",
                "sale_price",
                "description",
                "warranty",
                "tax",
                "discontinued",
                "is_serial_tracked",
                "requires_marking",
                "asset_tracking_type",
                "properties",
                "external_id",
                "archived",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-products-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacturer_sku": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "barcode_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "category_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sale_price": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "purchase_price": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "warranty": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "discontinued": {
                "type": "boolean"
              },
              "is_serial_tracked": {
                "type": "boolean"
              },
              "requires_marking": {
                "type": "boolean"
              },
              "asset_tracking_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "property_id": {
                      "type": "integer"
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "property_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "archived": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "sku",
              "manufacturer_sku",
              "barcode",
              "barcode_type_id",
              "manufacturer_id",
              "product_type_id",
              "category_id",
              "sale_price",
              "description",
              "warranty",
              "tax",
              "discontinued",
              "is_serial_tracked",
              "requires_marking",
              "asset_tracking_type",
              "properties",
              "external_id",
              "archived",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-categories-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "parent_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sort_order": {
                  "type": "integer"
                },
                "device_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_type_id": {
                  "type": "integer"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "website": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-reference-categories-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "parent_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_type_id": {
                "type": "integer"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "symbol": {
                "type": "string"
              },
              "stock_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "rack_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "row_number": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "column_number": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "calculation_type": {
                "type": "string",
                "enum": [
                  "fixed",
                  "percentage"
                ]
              },
              "value": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string"
                      },
                      "currency": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "direction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-categories-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "parent_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_type_id": {
                "type": "integer"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-kits-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "is_active",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-service-kits-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-kits-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-kit-items-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "operation_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "string"
                },
                "sort_order": {
                  "type": "integer"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "operation_id",
                "product_id",
                "quantity",
                "sort_order",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-service-kit-items-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "operation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "quantity": {
                "type": "string"
              },
              "sort_order": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "product_id",
              "quantity",
              "sort_order",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-kit-items-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "operation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "quantity": {
                "type": "string"
              },
              "sort_order": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "product_id",
              "quantity",
              "sort_order",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-stocks-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "workshop_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "assigned_user_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_default": {
                  "type": "boolean"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "workshop_id",
                "assigned_user_id",
                "is_active",
                "is_default",
                "description",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-stocks-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_default": {
                "type": "boolean"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "workshop_id",
              "assigned_user_id",
              "is_active",
              "is_default",
              "description",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-stock-levels-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stock_id": {
                  "type": "integer"
                },
                "product_id": {
                  "type": "integer"
                },
                "quantity": {
                  "type": "string"
                },
                "reserved": {
                  "type": "string"
                },
                "available": {
                  "type": "string"
                },
                "unit_id": {
                  "type": "integer"
                }
              },
              "required": [
                "stock_id",
                "product_id",
                "quantity",
                "reserved",
                "available",
                "unit_id"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-stock-levels-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "stock_id": {
                "type": "integer"
              },
              "product_id": {
                "type": "integer"
              },
              "quantity": {
                "type": "string"
              },
              "reserved": {
                "type": "string"
              },
              "available": {
                "type": "string"
              },
              "unit_id": {
                "type": "integer"
              }
            },
            "required": [
              "stock_id",
              "product_id",
              "quantity",
              "reserved",
              "available",
              "unit_id"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-checklists-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "scenario_id": {
                  "type": "integer"
                },
                "operation_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sort_order": {
                  "type": "integer"
                },
                "is_required": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "operation_id",
                "description",
                "sort_order",
                "is_required",
                "is_active",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-checklists-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "scenario_id": {
                "type": "integer"
              },
              "operation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "is_required": {
                "type": "boolean"
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "description",
              "sort_order",
              "is_required",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-checklists-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "scenario_id": {
                "type": "integer"
              },
              "operation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "is_required": {
                "type": "boolean"
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "description",
              "sort_order",
              "is_required",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-context-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "organization_id": {
                "type": "string",
                "description": "Идентификатор организации."
              },
              "user_id": {
                "type": "integer"
              },
              "client_id": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "workshop_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "features": {
                "type": "object",
                "additionalProperties": {
                  "type": "boolean"
                }
              },
              "api_version": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              },
              "access": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "trial_ends_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "subscription_ends_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "status",
                  "trial_ends_at",
                  "subscription_ends_at"
                ]
              }
            },
            "required": [
              "organization_id",
              "user_id",
              "client_id",
              "scopes",
              "workshop_ids",
              "features",
              "api_version",
              "timezone",
              "currency",
              "locale",
              "access"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-custom-fields-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "entity": {
                  "type": "string",
                  "enum": [
                    "act",
                    "customer",
                    "equipment",
                    "visit",
                    "maintenance_schedule"
                  ]
                },
                "scenario_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "textarea",
                    "richtext",
                    "number",
                    "select",
                    "multiselect",
                    "date",
                    "datetime",
                    "toggle",
                    "url",
                    "email",
                    "money",
                    "phone",
                    "radio",
                    "checkbox_list"
                  ]
                },
                "is_required": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "show_in_table": {
                  "type": "boolean"
                },
                "is_searchable": {
                  "type": "boolean"
                },
                "sort_order": {
                  "type": "integer"
                },
                "section": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "settings": {
                  "type": "object",
                  "properties": {
                    "min": {
                      "type": "string"
                    },
                    "max": {
                      "type": "string"
                    },
                    "step": {
                      "type": "string"
                    },
                    "rows": {
                      "type": "integer"
                    }
                  }
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "code",
                "entity",
                "scenario_id",
                "type",
                "is_required",
                "is_active",
                "show_in_table",
                "is_searchable",
                "sort_order",
                "section",
                "settings",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-custom-fields-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "entity": {
                "type": "string",
                "enum": [
                  "act",
                  "customer",
                  "equipment",
                  "visit",
                  "maintenance_schedule"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "textarea",
                  "richtext",
                  "number",
                  "select",
                  "multiselect",
                  "date",
                  "datetime",
                  "toggle",
                  "url",
                  "email",
                  "money",
                  "phone",
                  "radio",
                  "checkbox_list"
                ]
              },
              "is_required": {
                "type": "boolean"
              },
              "is_active": {
                "type": "boolean"
              },
              "show_in_table": {
                "type": "boolean"
              },
              "is_searchable": {
                "type": "boolean"
              },
              "sort_order": {
                "type": "integer"
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "settings": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "string"
                  },
                  "max": {
                    "type": "string"
                  },
                  "step": {
                    "type": "string"
                  },
                  "rows": {
                    "type": "integer"
                  }
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "code",
              "entity",
              "scenario_id",
              "type",
              "is_required",
              "is_active",
              "show_in_table",
              "is_searchable",
              "sort_order",
              "section",
              "settings",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-custom-fields-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "entity": {
                "type": "string",
                "enum": [
                  "act",
                  "customer",
                  "equipment",
                  "visit",
                  "maintenance_schedule"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "textarea",
                  "richtext",
                  "number",
                  "select",
                  "multiselect",
                  "date",
                  "datetime",
                  "toggle",
                  "url",
                  "email",
                  "money",
                  "phone",
                  "radio",
                  "checkbox_list"
                ]
              },
              "is_required": {
                "type": "boolean"
              },
              "is_active": {
                "type": "boolean"
              },
              "show_in_table": {
                "type": "boolean"
              },
              "is_searchable": {
                "type": "boolean"
              },
              "sort_order": {
                "type": "integer"
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "settings": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "string"
                  },
                  "max": {
                    "type": "string"
                  },
                  "step": {
                    "type": "string"
                  },
                  "rows": {
                    "type": "integer"
                  }
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "code",
              "entity",
              "scenario_id",
              "type",
              "is_required",
              "is_active",
              "show_in_table",
              "is_searchable",
              "sort_order",
              "section",
              "settings",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-custom-field-options-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "color": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sort_order": {
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "value",
                "label",
                "color",
                "sort_order",
                "is_active",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-custom-field-options-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "value": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "value",
              "label",
              "color",
              "sort_order",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-custom-field-options-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "value": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "value",
              "label",
              "color",
              "sort_order",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-customer-sites-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "customer_id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "contact_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "customer_id",
              "name",
              "code",
              "address",
              "latitude",
              "longitude",
              "contact_name",
              "phone",
              "email",
              "note",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-customer-sites-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "customer_id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "latitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "longitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "contact_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "customer_id",
                "name",
                "code",
                "address",
                "latitude",
                "longitude",
                "contact_name",
                "phone",
                "email",
                "note",
                "is_active",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-customer-sites-archive-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "archived"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-customers-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_customer": {
                  "type": "boolean"
                },
                "is_supplier": {
                  "type": "boolean"
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "additional_phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contacts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "position": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "position",
                      "phone"
                    ]
                  }
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field_id",
                      "value"
                    ]
                  }
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "edit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "portal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "edit",
                    "portal",
                    "public"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "inn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kpp": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ogrn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bank": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "bik": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "account": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "correspondent_account": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "bik",
                    "account",
                    "correspondent_account"
                  ]
                },
                "internal_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "company_name",
                "is_customer",
                "is_supplier",
                "phone",
                "additional_phone",
                "email",
                "address",
                "source",
                "contacts",
                "custom_fields",
                "external_id",
                "links",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-customers-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_customer": {
                "type": "boolean"
              },
              "is_supplier": {
                "type": "boolean"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "additional_phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "position",
                    "phone"
                  ]
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kpp": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ogrn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bank": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bik": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "account": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "correspondent_account": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "bik",
                  "account",
                  "correspondent_account"
                ]
              },
              "internal_note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "company_name",
              "is_customer",
              "is_supplier",
              "phone",
              "additional_phone",
              "email",
              "address",
              "source",
              "contacts",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-customers-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_customer": {
                "type": "boolean"
              },
              "is_supplier": {
                "type": "boolean"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "additional_phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "position",
                    "phone"
                  ]
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kpp": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ogrn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bank": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bik": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "account": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "correspondent_account": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "bik",
                  "account",
                  "correspondent_account"
                ]
              },
              "internal_note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "company_name",
              "is_customer",
              "is_supplier",
              "phone",
              "additional_phone",
              "email",
              "address",
              "source",
              "contacts",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visits-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "number": {
                  "type": "string"
                },
                "act_id": {
                  "type": "integer"
                },
                "customer_id": {
                  "type": "integer"
                },
                "workshop_id": {
                  "type": "integer"
                },
                "customer_site_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "starts_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ends_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "crew_user_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "client_window_start_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "client_window_end_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planning_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "latitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "longitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "planned",
                    "en_route",
                    "arrived",
                    "completed"
                  ]
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field_id",
                      "value"
                    ]
                  }
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "number",
                "act_id",
                "customer_id",
                "workshop_id",
                "customer_site_id",
                "starts_at",
                "ends_at",
                "crew_user_ids",
                "client_window_start_at",
                "client_window_end_at",
                "planning_duration_minutes",
                "duration_minutes",
                "address",
                "latitude",
                "longitude",
                "note",
                "state",
                "custom_fields",
                "version"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-visits-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": "string"
              },
              "act_id": {
                "type": "integer"
              },
              "customer_id": {
                "type": "integer"
              },
              "workshop_id": {
                "type": "integer"
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "starts_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ends_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "crew_user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "client_window_start_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_window_end_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "planning_duration_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "duration_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "planned",
                  "en_route",
                  "arrived",
                  "completed"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "number",
              "act_id",
              "customer_id",
              "workshop_id",
              "customer_site_id",
              "starts_at",
              "ends_at",
              "crew_user_ids",
              "client_window_start_at",
              "client_window_end_at",
              "planning_duration_minutes",
              "duration_minutes",
              "address",
              "latitude",
              "longitude",
              "note",
              "state",
              "custom_fields",
              "version"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visits-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": "string"
              },
              "act_id": {
                "type": "integer"
              },
              "customer_id": {
                "type": "integer"
              },
              "workshop_id": {
                "type": "integer"
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "starts_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ends_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "crew_user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "client_window_start_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_window_end_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "planning_duration_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "duration_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "planned",
                  "en_route",
                  "arrived",
                  "completed"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "number",
              "act_id",
              "customer_id",
              "workshop_id",
              "customer_site_id",
              "starts_at",
              "ends_at",
              "crew_user_ids",
              "client_window_start_at",
              "client_window_end_at",
              "planning_duration_minutes",
              "duration_minutes",
              "address",
              "latitude",
              "longitude",
              "note",
              "state",
              "custom_fields",
              "version"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-history-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "number": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "repair",
                        "installation",
                        "maintenance"
                      ]
                    },
                    "customer_id": {
                      "type": "integer"
                    },
                    "workshop_id": {
                      "type": "integer"
                    },
                    "stock_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "manager_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "technician_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status_id": {
                      "type": "integer"
                    },
                    "device_type_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "manufacturer_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "model_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "serial_number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "appearance": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_warranty_case": {
                      "type": "boolean"
                    },
                    "previous_act_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "project_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "service_contract_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "defect_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    },
                    "device_part_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      }
                    },
                    "custom_fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field_id": {
                            "type": "integer"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "amount": {
                                    "type": "string"
                                  },
                                  "currency": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "field_id",
                          "value"
                        ]
                      }
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "edit": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "portal": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "public": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "edit",
                        "portal",
                        "public"
                      ]
                    },
                    "version": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "internal_note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "type",
                    "customer_id",
                    "workshop_id",
                    "stock_id",
                    "manager_id",
                    "technician_id",
                    "status_id",
                    "device_type_id",
                    "manufacturer_id",
                    "model_name",
                    "serial_number",
                    "appearance",
                    "customer_note",
                    "is_warranty_case",
                    "previous_act_id",
                    "project_id",
                    "service_contract_id",
                    "defect_ids",
                    "device_part_ids",
                    "custom_fields",
                    "external_id",
                    "links",
                    "version",
                    "updated_at"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "equipment_id": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "type": "string"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "planned_date": {
                      "type": "string"
                    },
                    "deadline_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assigned_user_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "scenario_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "service_contract_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "workshop_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "completed_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "act_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "visit_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "maintenance_plan_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "custom_fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field_id": {
                            "type": "integer"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "amount": {
                                    "type": "string"
                                  },
                                  "currency": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "field_id",
                          "value"
                        ]
                      }
                    },
                    "version": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "equipment_id",
                    "title",
                    "description",
                    "type",
                    "priority",
                    "planned_date",
                    "deadline_at",
                    "assigned_user_id",
                    "scenario_id",
                    "service_contract_id",
                    "workshop_id",
                    "status",
                    "completed_date",
                    "result",
                    "act_id",
                    "visit_id",
                    "maintenance_plan_id",
                    "custom_fields",
                    "version",
                    "updated_at"
                  ]
                }
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-usage-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "reading": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "last_service_reading": {
                "type": "integer"
              },
              "maintenance_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "remaining_until_maintenance": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "plans": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "next_due_usage": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "remaining": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "next_due_usage",
                    "remaining"
                  ]
                }
              }
            },
            "required": [
              "reading",
              "usage_unit_id",
              "last_service_reading",
              "maintenance_interval",
              "remaining_until_maintenance",
              "plans"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-usage-store-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "reading": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "last_service_reading": {
                "type": "integer"
              },
              "maintenance_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "remaining_until_maintenance": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "plans": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "next_due_usage": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "remaining": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "next_due_usage",
                    "remaining"
                  ]
                }
              },
              "changed": {
                "type": "boolean"
              }
            },
            "required": [
              "reading",
              "usage_unit_id",
              "last_service_reading",
              "maintenance_interval",
              "remaining_until_maintenance",
              "plans",
              "changed"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-assignments-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "product_id": {
                  "type": "integer"
                },
                "type": {
                  "type": "string"
                },
                "identifier": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "string"
                },
                "starts_at": {
                  "type": "string"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ended_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stock_serial_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "act_product_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "product_id",
                "type",
                "identifier",
                "quantity",
                "starts_at",
                "expires_at",
                "ended_at",
                "note",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-assignments-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "product_id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "quantity": {
                "type": "string"
              },
              "starts_at": {
                "type": "string"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stock_serial_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "product_id",
              "type",
              "identifier",
              "quantity",
              "starts_at",
              "expires_at",
              "ended_at",
              "note",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-assignments-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "product_id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "quantity": {
                "type": "string"
              },
              "starts_at": {
                "type": "string"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stock_serial_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "product_id",
              "type",
              "identifier",
              "quantity",
              "starts_at",
              "expires_at",
              "ended_at",
              "note",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "customer_id": {
                "type": "integer"
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_model_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "model_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inventory_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacture_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "installation_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "warranty_expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "catalog_product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "technical_specs": {
                "type": [
                  "object",
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "last_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage_reading": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "customer_id",
              "customer_site_id",
              "equipment_model_id",
              "manufacturer_id",
              "device_type_id",
              "model_name",
              "serial_number",
              "inventory_number",
              "manufacture_date",
              "installation_date",
              "warranty_expires_at",
              "catalog_product_id",
              "location",
              "technical_specs",
              "status",
              "last_maintenance_date",
              "next_maintenance_date",
              "usage_reading",
              "usage_unit_id",
              "maintenance_interval",
              "note",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "customer_id": {
                  "type": "integer"
                },
                "customer_site_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "equipment_model_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufacturer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "device_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "model_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "inventory_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufacture_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "installation_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "warranty_expires_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "catalog_product_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "technical_specs": {
                  "type": [
                    "object",
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "last_maintenance_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "next_maintenance_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "usage_reading": {
                  "type": "integer"
                },
                "usage_unit_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maintenance_interval": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field_id",
                      "value"
                    ]
                  }
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "edit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "portal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "edit",
                    "portal",
                    "public"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "customer_id",
                "customer_site_id",
                "equipment_model_id",
                "manufacturer_id",
                "device_type_id",
                "model_name",
                "serial_number",
                "inventory_number",
                "manufacture_date",
                "installation_date",
                "warranty_expires_at",
                "catalog_product_id",
                "location",
                "technical_specs",
                "status",
                "last_maintenance_date",
                "next_maintenance_date",
                "usage_reading",
                "usage_unit_id",
                "maintenance_interval",
                "note",
                "custom_fields",
                "external_id",
                "links",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-defects-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high",
                    "critical"
                  ]
                },
                "found_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "in_progress",
                    "resolved",
                    "dismissed"
                  ]
                },
                "resolved_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reported_by": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maintenance_schedule_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "act_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "equipment_id",
                "title",
                "description",
                "severity",
                "found_date",
                "status",
                "resolved_date",
                "reported_by",
                "maintenance_schedule_id",
                "act_id",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-defects-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "found_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "in_progress",
                  "resolved",
                  "dismissed"
                ]
              },
              "resolved_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reported_by": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "severity",
              "found_date",
              "status",
              "resolved_date",
              "reported_by",
              "maintenance_schedule_id",
              "act_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-defects-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "found_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "in_progress",
                  "resolved",
                  "dismissed"
                ]
              },
              "resolved_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reported_by": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_schedule_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "severity",
              "found_date",
              "status",
              "resolved_date",
              "reported_by",
              "maintenance_schedule_id",
              "act_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-downtimes-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "unplanned",
                    "planned"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "cause": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "remedy": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "type": "string"
                },
                "restored_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "stopped",
                    "repair",
                    "waiting_parts",
                    "restored"
                  ]
                },
                "restoration_cost": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "equipment_defect_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "act_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "previous_downtime_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "waiting_parts_seconds": {
                  "type": "integer"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "equipment_id",
                "kind",
                "title",
                "cause",
                "remedy",
                "started_at",
                "restored_at",
                "state",
                "equipment_defect_id",
                "act_id",
                "previous_downtime_id",
                "waiting_parts_seconds",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-downtimes-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "unplanned",
                  "planned"
                ]
              },
              "title": {
                "type": "string"
              },
              "cause": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "remedy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "started_at": {
                "type": "string"
              },
              "restored_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "stopped",
                  "repair",
                  "waiting_parts",
                  "restored"
                ]
              },
              "restoration_cost": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "equipment_defect_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "previous_downtime_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "waiting_parts_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "kind",
              "title",
              "cause",
              "remedy",
              "started_at",
              "restored_at",
              "state",
              "equipment_defect_id",
              "act_id",
              "previous_downtime_id",
              "waiting_parts_seconds",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-downtimes-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "unplanned",
                  "planned"
                ]
              },
              "title": {
                "type": "string"
              },
              "cause": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "remedy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "started_at": {
                "type": "string"
              },
              "restored_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "stopped",
                  "repair",
                  "waiting_parts",
                  "restored"
                ]
              },
              "restoration_cost": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "equipment_defect_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "previous_downtime_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "waiting_parts_seconds": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "kind",
              "title",
              "cause",
              "remedy",
              "started_at",
              "restored_at",
              "state",
              "equipment_defect_id",
              "act_id",
              "previous_downtime_id",
              "waiting_parts_seconds",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-downtimes-events-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_downtime_id": {
                  "type": "integer"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "stopped",
                    "repair",
                    "waiting_parts",
                    "restored"
                  ]
                },
                "occurred_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "equipment_downtime_id",
                "state",
                "occurred_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-media-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "photo",
                    "document"
                  ]
                },
                "filename": {
                  "type": "string"
                },
                "mime_type": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "download_url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "equipment_id",
                "kind",
                "filename",
                "mime_type",
                "size",
                "created_at",
                "version",
                "download_url"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-media-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "photo",
                  "document"
                ]
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "equipment_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-media-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "photo",
                  "document"
                ]
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "equipment_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-models-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "manufacturer_id": {
                  "type": "integer"
                },
                "device_type_id": {
                  "type": "integer"
                },
                "model_name": {
                  "type": "string"
                },
                "modification": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "firmware": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "manufacturer_id",
                "device_type_id",
                "model_name",
                "modification",
                "firmware",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-equipment-models-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "manufacturer_id": {
                "type": "integer"
              },
              "device_type_id": {
                "type": "integer"
              },
              "model_name": {
                "type": "string"
              },
              "modification": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "firmware": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "manufacturer_id",
              "device_type_id",
              "model_name",
              "modification",
              "firmware",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-models-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "manufacturer_id": {
                "type": "integer"
              },
              "device_type_id": {
                "type": "integer"
              },
              "model_name": {
                "type": "string"
              },
              "modification": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "firmware": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "manufacturer_id",
              "device_type_id",
              "model_name",
              "modification",
              "firmware",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-leads-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "customer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "assigned_user_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "follow_up_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "desired_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "phone",
                "email",
                "customer_id",
                "assigned_user_id",
                "status",
                "follow_up_at",
                "desired_at",
                "external_id",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-leads-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "follow_up_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "desired_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "phone",
              "email",
              "customer_id",
              "assigned_user_id",
              "status",
              "follow_up_at",
              "desired_at",
              "external_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-leads-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "follow_up_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "desired_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "phone",
              "email",
              "customer_id",
              "assigned_user_id",
              "status",
              "follow_up_at",
              "desired_at",
              "external_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-leads-convert-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "lead_id": {
                "type": "integer"
              },
              "customer_id": {
                "type": "integer"
              },
              "changed": {
                "type": "boolean"
              }
            },
            "required": [
              "lead_id",
              "customer_id",
              "changed"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-equipment-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "customer_id": {
                "type": "integer"
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_model_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacturer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "model_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inventory_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufacture_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "installation_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "warranty_expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "catalog_product_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "technical_specs": {
                "type": [
                  "object",
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "last_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage_reading": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "customer_id",
              "customer_site_id",
              "equipment_model_id",
              "manufacturer_id",
              "device_type_id",
              "model_name",
              "serial_number",
              "inventory_number",
              "manufacture_date",
              "installation_date",
              "warranty_expires_at",
              "catalog_product_id",
              "location",
              "technical_specs",
              "status",
              "last_maintenance_date",
              "next_maintenance_date",
              "usage_reading",
              "usage_unit_id",
              "maintenance_interval",
              "note",
              "custom_fields",
              "external_id",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-customer-sites-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "customer_id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "contact_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "customer_id",
              "name",
              "code",
              "address",
              "latitude",
              "longitude",
              "contact_name",
              "phone",
              "email",
              "note",
              "is_active",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-contracts-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "customer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "customer_site_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "workshop_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "suspended",
                    "ended"
                  ]
                },
                "billing_period": {
                  "type": "string",
                  "enum": [
                    "monthly",
                    "quarterly",
                    "yearly"
                  ]
                },
                "reaction_hours": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "resolution_hours": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "start_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "end_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "equipment_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "next_maintenance_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "maintenance_interval_days": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fee": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "discount_operations": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "discount_products": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "next_invoice_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "customer_id",
                "customer_site_id",
                "workshop_id",
                "status",
                "billing_period",
                "reaction_hours",
                "resolution_hours",
                "start_date",
                "end_date",
                "equipment_ids",
                "next_maintenance_date",
                "maintenance_interval_days",
                "note",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-service-contracts-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "active",
                  "suspended",
                  "ended"
                ]
              },
              "billing_period": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly",
                  "yearly"
                ]
              },
              "reaction_hours": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "resolution_hours": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "next_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "maintenance_interval_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fee": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount_operations": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "discount_products": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_invoice_date": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "title",
              "customer_id",
              "customer_site_id",
              "workshop_id",
              "status",
              "billing_period",
              "reaction_hours",
              "resolution_hours",
              "start_date",
              "end_date",
              "equipment_ids",
              "next_maintenance_date",
              "maintenance_interval_days",
              "note",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-contracts-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "active",
                  "suspended",
                  "ended"
                ]
              },
              "billing_period": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly",
                  "yearly"
                ]
              },
              "reaction_hours": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "resolution_hours": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "next_maintenance_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "maintenance_interval_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fee": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "discount_operations": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "discount_products": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_invoice_date": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "number",
              "title",
              "customer_id",
              "customer_site_id",
              "workshop_id",
              "status",
              "billing_period",
              "reaction_hours",
              "resolution_hours",
              "start_date",
              "end_date",
              "equipment_ids",
              "next_maintenance_date",
              "maintenance_interval_days",
              "note",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-scenarios-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "equipment_state_key": {
                  "type": "string"
                },
                "calculation_rules": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "device_type_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "field_id"
                    ]
                  }
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "key",
                "description",
                "is_active",
                "equipment_state_key",
                "calculation_rules",
                "device_type_ids",
                "custom_fields",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-maintenance-scenarios-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "equipment_state_key": {
                "type": "string"
              },
              "calculation_rules": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "device_type_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "field_id"
                  ]
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "key",
              "description",
              "is_active",
              "equipment_state_key",
              "calculation_rules",
              "device_type_ids",
              "custom_fields",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-scenarios-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "equipment_state_key": {
                "type": "string"
              },
              "calculation_rules": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "device_type_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "field_id"
                  ]
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "key",
              "description",
              "is_active",
              "equipment_state_key",
              "calculation_rules",
              "device_type_ids",
              "custom_fields",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-schedules-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": "string"
                },
                "priority": {
                  "type": "string"
                },
                "planned_date": {
                  "type": "string"
                },
                "deadline_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "assigned_user_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "scenario_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "service_contract_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "workshop_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "completed_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "result": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "act_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "visit_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maintenance_plan_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "custom_fields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field_id": {
                        "type": "integer"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field_id",
                      "value"
                    ]
                  }
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "equipment_id",
                "title",
                "description",
                "type",
                "priority",
                "planned_date",
                "deadline_at",
                "assigned_user_id",
                "scenario_id",
                "service_contract_id",
                "workshop_id",
                "status",
                "completed_date",
                "result",
                "act_id",
                "visit_id",
                "maintenance_plan_id",
                "custom_fields",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-maintenance-schedules-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "planned_date": {
                "type": "string"
              },
              "deadline_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "completed_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_plan_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "type",
              "priority",
              "planned_date",
              "deadline_at",
              "assigned_user_id",
              "scenario_id",
              "service_contract_id",
              "workshop_id",
              "status",
              "completed_date",
              "result",
              "act_id",
              "visit_id",
              "maintenance_plan_id",
              "custom_fields",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-schedules-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "planned_date": {
                "type": "string"
              },
              "deadline_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "completed_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "act_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_plan_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "integer"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "field_id",
                    "value"
                  ]
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "type",
              "priority",
              "planned_date",
              "deadline_at",
              "assigned_user_id",
              "scenario_id",
              "service_contract_id",
              "workshop_id",
              "status",
              "completed_date",
              "result",
              "act_id",
              "visit_id",
              "maintenance_plan_id",
              "custom_fields",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-checklists-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_required": {
                      "type": "boolean"
                    },
                    "is_completed": {
                      "type": "boolean"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "completed_by": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "completed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer"
                    },
                    "operation_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "equipment_checklist_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "scenario_checklist_item_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "is_required",
                    "is_completed",
                    "note",
                    "completed_by",
                    "completed_at",
                    "version",
                    "operation_id",
                    "equipment_checklist_id",
                    "scenario_checklist_item_id"
                  ]
                }
              },
              "schedule_version": {
                "type": "string"
              }
            },
            "required": [
              "items",
              "schedule_version"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-checklists-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_required": {
                "type": "boolean"
              },
              "is_completed": {
                "type": "boolean"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_by": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "integer"
              },
              "operation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_checklist_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_checklist_item_id": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "description",
              "is_required",
              "is_completed",
              "note",
              "completed_by",
              "completed_at",
              "version",
              "operation_id",
              "equipment_checklist_id",
              "scenario_checklist_item_id"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-checklists-initialize-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_required": {
                      "type": "boolean"
                    },
                    "is_completed": {
                      "type": "boolean"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "completed_by": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "completed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer"
                    },
                    "operation_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "equipment_checklist_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "scenario_checklist_item_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "is_required",
                    "is_completed",
                    "note",
                    "completed_by",
                    "completed_at",
                    "version",
                    "operation_id",
                    "equipment_checklist_id",
                    "scenario_checklist_item_id"
                  ]
                }
              },
              "schedule_version": {
                "type": "string"
              }
            },
            "required": [
              "items",
              "schedule_version"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-plans-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "equipment_id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": "string"
                },
                "priority": {
                  "type": "string"
                },
                "trigger_type": {
                  "type": "string"
                },
                "schedule_mode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "calendar_interval_value": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "calendar_interval_unit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "usage_interval": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "usage_lead": {
                  "type": "integer"
                },
                "anchor_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "calendar_pattern": {
                  "type": "string"
                },
                "week_days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "month_days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "workshop_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "scenario_defaults": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "completion_window_value": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "completion_window_unit": {
                  "type": "string"
                },
                "assigned_user_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "scenario_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "service_contract_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "starts_on": {
                  "type": "string"
                },
                "ends_on": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generation_time": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lead_time_days": {
                  "type": "integer"
                },
                "next_due_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "next_due_usage": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next_cycle_number": {
                  "type": "integer"
                },
                "maintenance_regulation_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "regulation_overridden": {
                  "type": "boolean"
                },
                "revision": {
                  "type": "integer"
                },
                "status": {
                  "type": "string"
                },
                "equipment_date_field": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "edit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "portal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "edit",
                    "portal",
                    "public"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "equipment_id",
                "title",
                "description",
                "type",
                "priority",
                "trigger_type",
                "schedule_mode",
                "calendar_interval_value",
                "calendar_interval_unit",
                "usage_interval",
                "usage_lead",
                "anchor_date",
                "calendar_pattern",
                "week_days",
                "month_days",
                "workshop_id",
                "scenario_defaults",
                "completion_window_value",
                "completion_window_unit",
                "assigned_user_id",
                "scenario_id",
                "service_contract_id",
                "starts_on",
                "ends_on",
                "generation_time",
                "lead_time_days",
                "next_due_date",
                "next_due_usage",
                "next_cycle_number",
                "maintenance_regulation_id",
                "regulation_overridden",
                "revision",
                "status",
                "equipment_date_field",
                "links",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-maintenance-plans-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "trigger_type": {
                "type": "string"
              },
              "schedule_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_interval_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "calendar_interval_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "usage_lead": {
                "type": "integer"
              },
              "anchor_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_pattern": {
                "type": "string"
              },
              "week_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "month_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_defaults": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "completion_window_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "completion_window_unit": {
                "type": "string"
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generation_time": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lead_time_days": {
                "type": "integer"
              },
              "next_due_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_due_usage": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_cycle_number": {
                "type": "integer"
              },
              "maintenance_regulation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "regulation_overridden": {
                "type": "boolean"
              },
              "revision": {
                "type": "integer"
              },
              "status": {
                "type": "string"
              },
              "equipment_date_field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "type",
              "priority",
              "trigger_type",
              "schedule_mode",
              "calendar_interval_value",
              "calendar_interval_unit",
              "usage_interval",
              "usage_lead",
              "anchor_date",
              "calendar_pattern",
              "week_days",
              "month_days",
              "workshop_id",
              "scenario_defaults",
              "completion_window_value",
              "completion_window_unit",
              "assigned_user_id",
              "scenario_id",
              "service_contract_id",
              "starts_on",
              "ends_on",
              "generation_time",
              "lead_time_days",
              "next_due_date",
              "next_due_usage",
              "next_cycle_number",
              "maintenance_regulation_id",
              "regulation_overridden",
              "revision",
              "status",
              "equipment_date_field",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-plans-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "equipment_id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "trigger_type": {
                "type": "string"
              },
              "schedule_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_interval_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "calendar_interval_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "usage_lead": {
                "type": "integer"
              },
              "anchor_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_pattern": {
                "type": "string"
              },
              "week_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "month_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "workshop_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_defaults": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "completion_window_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "completion_window_unit": {
                "type": "string"
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generation_time": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lead_time_days": {
                "type": "integer"
              },
              "next_due_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_due_usage": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_cycle_number": {
                "type": "integer"
              },
              "maintenance_regulation_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "regulation_overridden": {
                "type": "boolean"
              },
              "revision": {
                "type": "integer"
              },
              "status": {
                "type": "string"
              },
              "equipment_date_field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "equipment_id",
              "title",
              "description",
              "type",
              "priority",
              "trigger_type",
              "schedule_mode",
              "calendar_interval_value",
              "calendar_interval_unit",
              "usage_interval",
              "usage_lead",
              "anchor_date",
              "calendar_pattern",
              "week_days",
              "month_days",
              "workshop_id",
              "scenario_defaults",
              "completion_window_value",
              "completion_window_unit",
              "assigned_user_id",
              "scenario_id",
              "service_contract_id",
              "starts_on",
              "ends_on",
              "generation_time",
              "lead_time_days",
              "next_due_date",
              "next_due_usage",
              "next_cycle_number",
              "maintenance_regulation_id",
              "regulation_overridden",
              "revision",
              "status",
              "equipment_date_field",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-regulations-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scope_type": {
                  "type": "string"
                },
                "customer_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "customer_site_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "service_contract_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "workshop_id": {
                  "type": "integer"
                },
                "equipment_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "equipment_model_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "device_type_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "excluded_equipment_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "trigger_type": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "priority": {
                  "type": "string"
                },
                "schedule_mode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "anchor_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "calendar_interval_value": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "calendar_interval_unit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "calendar_pattern": {
                  "type": "string"
                },
                "week_days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "month_days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "usage_interval": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "usage_lead": {
                  "type": "integer"
                },
                "usage_unit_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "equipment_date_field": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "starts_on": {
                  "type": "string"
                },
                "ends_on": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generation_time": {
                  "type": "string"
                },
                "lead_time_days": {
                  "type": "integer"
                },
                "completion_window_value": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "completion_window_unit": {
                  "type": "string"
                },
                "scenario_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "assigned_user_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "scenario_defaults": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "status": {
                  "type": "string"
                },
                "revision": {
                  "type": "integer"
                },
                "synced_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "edit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "portal": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "edit",
                    "portal",
                    "public"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "title",
                "description",
                "scope_type",
                "customer_id",
                "customer_site_id",
                "service_contract_id",
                "workshop_id",
                "equipment_ids",
                "equipment_model_ids",
                "device_type_ids",
                "excluded_equipment_ids",
                "trigger_type",
                "type",
                "priority",
                "schedule_mode",
                "anchor_date",
                "calendar_interval_value",
                "calendar_interval_unit",
                "calendar_pattern",
                "week_days",
                "month_days",
                "usage_interval",
                "usage_lead",
                "usage_unit_id",
                "equipment_date_field",
                "starts_on",
                "ends_on",
                "generation_time",
                "lead_time_days",
                "completion_window_value",
                "completion_window_unit",
                "scenario_id",
                "assigned_user_id",
                "scenario_defaults",
                "status",
                "revision",
                "synced_at",
                "links",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-maintenance-regulations-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scope_type": {
                "type": "string"
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": "integer"
              },
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "equipment_model_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "device_type_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "excluded_equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "trigger_type": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "schedule_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "anchor_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_interval_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "calendar_interval_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_pattern": {
                "type": "string"
              },
              "week_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "month_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "usage_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "usage_lead": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_date_field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generation_time": {
                "type": "string"
              },
              "lead_time_days": {
                "type": "integer"
              },
              "completion_window_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "completion_window_unit": {
                "type": "string"
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_defaults": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "status": {
                "type": "string"
              },
              "revision": {
                "type": "integer"
              },
              "synced_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "description",
              "scope_type",
              "customer_id",
              "customer_site_id",
              "service_contract_id",
              "workshop_id",
              "equipment_ids",
              "equipment_model_ids",
              "device_type_ids",
              "excluded_equipment_ids",
              "trigger_type",
              "type",
              "priority",
              "schedule_mode",
              "anchor_date",
              "calendar_interval_value",
              "calendar_interval_unit",
              "calendar_pattern",
              "week_days",
              "month_days",
              "usage_interval",
              "usage_lead",
              "usage_unit_id",
              "equipment_date_field",
              "starts_on",
              "ends_on",
              "generation_time",
              "lead_time_days",
              "completion_window_value",
              "completion_window_unit",
              "scenario_id",
              "assigned_user_id",
              "scenario_defaults",
              "status",
              "revision",
              "synced_at",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-regulations-store-202": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "const": "processing"
              },
              "regulation": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope_type": {
                    "type": "string"
                  },
                  "customer_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "customer_site_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "service_contract_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "workshop_id": {
                    "type": "integer"
                  },
                  "equipment_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "equipment_model_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "device_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "excluded_equipment_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "trigger_type": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "schedule_mode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "anchor_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "calendar_interval_value": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "calendar_interval_unit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "calendar_pattern": {
                    "type": "string"
                  },
                  "week_days": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "month_days": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "usage_interval": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "usage_lead": {
                    "type": "integer"
                  },
                  "usage_unit_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "equipment_date_field": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "starts_on": {
                    "type": "string"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "generation_time": {
                    "type": "string"
                  },
                  "lead_time_days": {
                    "type": "integer"
                  },
                  "completion_window_value": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "completion_window_unit": {
                    "type": "string"
                  },
                  "scenario_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "assigned_user_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "scenario_defaults": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string"
                            },
                            "currency": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "status": {
                    "type": "string"
                  },
                  "revision": {
                    "type": "integer"
                  },
                  "synced_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "links": {
                    "type": "object",
                    "properties": {
                      "edit": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "portal": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "public": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "edit",
                      "portal",
                      "public"
                    ]
                  },
                  "version": {
                    "type": "string"
                  },
                  "updated_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "title",
                  "description",
                  "scope_type",
                  "customer_id",
                  "customer_site_id",
                  "service_contract_id",
                  "workshop_id",
                  "equipment_ids",
                  "equipment_model_ids",
                  "device_type_ids",
                  "excluded_equipment_ids",
                  "trigger_type",
                  "type",
                  "priority",
                  "schedule_mode",
                  "anchor_date",
                  "calendar_interval_value",
                  "calendar_interval_unit",
                  "calendar_pattern",
                  "week_days",
                  "month_days",
                  "usage_interval",
                  "usage_lead",
                  "usage_unit_id",
                  "equipment_date_field",
                  "starts_on",
                  "ends_on",
                  "generation_time",
                  "lead_time_days",
                  "completion_window_value",
                  "completion_window_unit",
                  "scenario_id",
                  "assigned_user_id",
                  "scenario_defaults",
                  "status",
                  "revision",
                  "synced_at",
                  "links",
                  "version",
                  "updated_at"
                ]
              }
            },
            "required": [
              "operation_id",
              "state",
              "regulation"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-regulations-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scope_type": {
                "type": "string"
              },
              "customer_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "customer_site_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "service_contract_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "workshop_id": {
                "type": "integer"
              },
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "equipment_model_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "device_type_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "excluded_equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "trigger_type": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "priority": {
                "type": "string"
              },
              "schedule_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "anchor_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_interval_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "calendar_interval_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "calendar_pattern": {
                "type": "string"
              },
              "week_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "month_days": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "usage_interval": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "usage_lead": {
                "type": "integer"
              },
              "usage_unit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "equipment_date_field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generation_time": {
                "type": "string"
              },
              "lead_time_days": {
                "type": "integer"
              },
              "completion_window_value": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "completion_window_unit": {
                "type": "string"
              },
              "scenario_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "assigned_user_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scenario_defaults": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "status": {
                "type": "string"
              },
              "revision": {
                "type": "integer"
              },
              "synced_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "links": {
                "type": "object",
                "properties": {
                  "edit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "portal": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "public": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "edit",
                  "portal",
                  "public"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "description",
              "scope_type",
              "customer_id",
              "customer_site_id",
              "service_contract_id",
              "workshop_id",
              "equipment_ids",
              "equipment_model_ids",
              "device_type_ids",
              "excluded_equipment_ids",
              "trigger_type",
              "type",
              "priority",
              "schedule_mode",
              "anchor_date",
              "calendar_interval_value",
              "calendar_interval_unit",
              "calendar_pattern",
              "week_days",
              "month_days",
              "usage_interval",
              "usage_lead",
              "usage_unit_id",
              "equipment_date_field",
              "starts_on",
              "ends_on",
              "generation_time",
              "lead_time_days",
              "completion_window_value",
              "completion_window_unit",
              "scenario_id",
              "assigned_user_id",
              "scenario_defaults",
              "status",
              "revision",
              "synced_at",
              "links",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-reports-calendar-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "schedule",
                        "forecast"
                      ]
                    },
                    "schedule_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "plan_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "equipment_id": {
                      "type": "integer"
                    },
                    "workshop_id": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "deadline_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "cycle": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "conditional": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "schedule_id",
                    "plan_id",
                    "equipment_id",
                    "workshop_id",
                    "date",
                    "deadline_at",
                    "status",
                    "cycle",
                    "conditional",
                    "reason"
                  ]
                }
              },
              "totals": {
                "type": "object",
                "properties": {
                  "existing": {
                    "type": "integer"
                  },
                  "forecast": {
                    "type": "integer"
                  },
                  "undated_plans": {
                    "type": "integer"
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "existing",
                  "forecast",
                  "undated_plans",
                  "truncated"
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "from",
              "to",
              "items",
              "totals",
              "explanation"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-reports-plan-fact-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "month": {
                      "type": "string"
                    },
                    "planned": {
                      "type": "integer"
                    },
                    "completed": {
                      "type": "integer"
                    },
                    "completion_rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "month",
                    "planned",
                    "completed",
                    "completion_rate"
                  ]
                }
              },
              "totals": {
                "type": "object",
                "properties": {
                  "planned": {
                    "type": "integer"
                  },
                  "completed": {
                    "type": "integer"
                  },
                  "on_time": {
                    "type": "integer"
                  },
                  "completion_rate": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "on_time_rate": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "mean_days_to_complete": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "mean_days_between_services": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "planned",
                  "completed",
                  "on_time",
                  "completion_rate",
                  "on_time_rate",
                  "mean_days_to_complete",
                  "mean_days_between_services"
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "from",
              "to",
              "items",
              "totals",
              "explanation"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-reports-parts-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "product_id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "measure_id": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    },
                    "reserved_quantity": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "issued_quantity": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "uncovered_quantity": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "product_id",
                    "name",
                    "measure_id",
                    "date",
                    "quantity",
                    "reserved_quantity",
                    "issued_quantity",
                    "uncovered_quantity"
                  ]
                }
              },
              "totals": {
                "type": "object",
                "properties": {
                  "lines": {
                    "type": "integer"
                  },
                  "stock_id": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "stock_explanation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "lines",
                  "stock_id",
                  "stock_explanation"
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "from",
              "to",
              "items",
              "totals",
              "explanation"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-reports-reliability-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "equipment_id": {
                      "type": "integer"
                    },
                    "failures": {
                      "type": "integer"
                    },
                    "repeats": {
                      "type": "integer"
                    },
                    "active": {
                      "type": "integer"
                    },
                    "unplanned_hours": {
                      "type": "number"
                    },
                    "planned_hours": {
                      "type": "number"
                    },
                    "waiting_hours": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "equipment_id",
                    "failures",
                    "repeats",
                    "active",
                    "unplanned_hours",
                    "planned_hours",
                    "waiting_hours"
                  ]
                }
              },
              "totals": {
                "type": "object",
                "properties": {
                  "failures": {
                    "type": "integer"
                  },
                  "repeats": {
                    "type": "integer"
                  },
                  "active": {
                    "type": "integer"
                  },
                  "unplanned_hours": {
                    "type": "number"
                  },
                  "planned_hours": {
                    "type": "number"
                  },
                  "waiting_hours": {
                    "type": "number"
                  },
                  "mean_restore_hours": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "mean_operating_hours": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "failures",
                  "repeats",
                  "active",
                  "unplanned_hours",
                  "planned_hours",
                  "waiting_hours",
                  "mean_restore_hours",
                  "mean_operating_hours"
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "costs": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "currency": {
                    "type": "string"
                  },
                  "known_observations": {
                    "type": "integer"
                  },
                  "unknown_observations": {
                    "type": "integer"
                  },
                  "explanation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "amount",
                  "currency",
                  "known_observations",
                  "unknown_observations",
                  "explanation"
                ]
              }
            },
            "required": [
              "from",
              "to",
              "items",
              "totals",
              "explanation"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-scenarios-simulate-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "traces": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "final_state": {
                "type": "object"
              },
              "first_matched_rule_index": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "traces",
              "final_state",
              "first_matched_rule_index"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-scenarios-export-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "format_version": {
                "type": "integer"
              },
              "exported_at": {
                "type": "string"
              },
              "fingerprint": {
                "type": "string"
              },
              "scenario": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "equipment_state_key": {
                    "type": "string"
                  },
                  "calculation_rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "custom_fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "checklist_items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "operation_name": {
                          "type": "string"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sort_order": {
                          "type": "integer"
                        },
                        "is_required": {
                          "type": "boolean"
                        },
                        "is_active": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "operation_name",
                        "description",
                        "sort_order",
                        "is_required",
                        "is_active"
                      ]
                    }
                  },
                  "device_type_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name",
                  "key",
                  "description",
                  "is_active",
                  "equipment_state_key",
                  "calculation_rules",
                  "custom_fields",
                  "checklist_items",
                  "device_type_names"
                ]
              }
            },
            "required": [
              "format_version",
              "exported_at",
              "fingerprint",
              "scenario"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-maintenance-schedules-plan-visit-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "act_id": {
                "type": "integer"
              },
              "visit_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "maintenance_schedule_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "equipment_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            },
            "required": [
              "act_id",
              "visit_id",
              "maintenance_schedule_ids",
              "equipment_ids"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-catalog-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "enums": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "methods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "type",
                    "path",
                    "methods"
                  ]
                }
              }
            },
            "required": [
              "enums",
              "resources"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-enums-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "metadata": {
                      "type": "object"
                    }
                  },
                  "required": [
                    "value",
                    "label",
                    "metadata"
                  ]
                }
              }
            },
            "required": [
              "name",
              "items"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-roles-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-reference-statuses-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                },
                "sort_order": {
                  "type": "integer"
                },
                "act_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "repair",
                    "installation",
                    "maintenance",
                    null
                  ]
                },
                "completes_act": {
                  "type": "boolean"
                },
                "accrues_wages": {
                  "type": "boolean"
                },
                "sla_days": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requires_estimate_approval": {
                  "type": "boolean"
                },
                "pickup_reminder_days": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next_status_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "role_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "user_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "color",
                "sort_order",
                "act_type",
                "completes_act",
                "accrues_wages",
                "sla_days",
                "requires_estimate_approval",
                "pickup_reminder_days",
                "next_status_ids",
                "role_ids",
                "user_ids",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-reference-statuses-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "sort_order": {
                "type": "integer"
              },
              "act_type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "repair",
                  "installation",
                  "maintenance",
                  null
                ]
              },
              "completes_act": {
                "type": "boolean"
              },
              "accrues_wages": {
                "type": "boolean"
              },
              "sla_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "requires_estimate_approval": {
                "type": "boolean"
              },
              "pickup_reminder_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_status_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "role_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "color",
              "sort_order",
              "act_type",
              "completes_act",
              "accrues_wages",
              "sla_days",
              "requires_estimate_approval",
              "pickup_reminder_days",
              "next_status_ids",
              "role_ids",
              "user_ids",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-statuses-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "sort_order": {
                "type": "integer"
              },
              "act_type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "repair",
                  "installation",
                  "maintenance",
                  null
                ]
              },
              "completes_act": {
                "type": "boolean"
              },
              "accrues_wages": {
                "type": "boolean"
              },
              "sla_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "requires_estimate_approval": {
                "type": "boolean"
              },
              "pickup_reminder_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_status_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "role_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "color",
              "sort_order",
              "act_type",
              "completes_act",
              "accrues_wages",
              "sla_days",
              "requires_estimate_approval",
              "pickup_reminder_days",
              "next_status_ids",
              "role_ids",
              "user_ids",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-users-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "workshop_id": {
                  "type": "integer"
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "workshop_id",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-users-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "workshop_id": {
                "type": "integer"
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "workshop_id",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-workshops-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "primary_process": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "repair",
                    "installation",
                    "maintenance",
                    null
                  ]
                },
                "city": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "hourly_rate": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "primary_process",
                "city",
                "address",
                "phone",
                "hourly_rate",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-workshops-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "primary_process": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "repair",
                  "installation",
                  "maintenance",
                  null
                ]
              },
              "city": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "hourly_rate": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "primary_process",
              "city",
              "address",
              "phone",
              "hourly_rate",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-workshops-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "primary_process": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "repair",
                  "installation",
                  "maintenance",
                  null
                ]
              },
              "city": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "hourly_rate": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "primary_process",
              "city",
              "address",
              "phone",
              "hourly_rate",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-reference-device-types-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "parent_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sort_order": {
                  "type": "integer"
                },
                "device_type_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_type_id": {
                  "type": "integer"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "website": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "symbol": {
                  "type": "string"
                },
                "stock_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "rack_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "row_number": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "column_number": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "calculation_type": {
                  "type": "string",
                  "enum": [
                    "fixed",
                    "percentage"
                  ]
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "direction": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "version",
                "updated_at"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-reference-device-types-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "parent_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer"
              },
              "device_type_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "product_type_id": {
                "type": "integer"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "symbol": {
                "type": "string"
              },
              "stock_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "rack_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "row_number": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "column_number": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "calculation_type": {
                "type": "string",
                "enum": [
                  "fixed",
                  "percentage"
                ]
              },
              "value": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string"
                      },
                      "currency": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "currency"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "direction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "version",
              "updated_at"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-service-contract-charges-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "service_contract_id": {
                  "type": "integer"
                },
                "period_date": {
                  "type": "string"
                },
                "amount": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "is_paid": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "service_contract_id",
                "period_date",
                "amount",
                "is_paid"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-service-contract-charges-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "service_contract_id": {
                "type": "integer"
              },
              "period_date": {
                "type": "string"
              },
              "amount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "is_paid": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "service_contract_id",
              "period_date",
              "amount",
              "is_paid"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-user-availability-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "windows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "weekday": {
                      "type": "integer"
                    },
                    "starts_at": {
                      "type": "string"
                    },
                    "ends_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "weekday",
                    "starts_at",
                    "ends_at"
                  ]
                }
              },
              "days_off": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "date",
                    "reason"
                  ]
                }
              },
              "timezone": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "windows",
              "days_off",
              "timezone",
              "version"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "period": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            },
            "required": [
              "period"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-user-availability-save-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "windows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "weekday": {
                      "type": "integer"
                    },
                    "starts_at": {
                      "type": "string"
                    },
                    "ends_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "weekday",
                    "starts_at",
                    "ends_at"
                  ]
                }
              },
              "days_off": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "date",
                    "reason"
                  ]
                }
              },
              "timezone": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "windows",
              "days_off",
              "timezone",
              "version"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-user-availability-day-off-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "date": {
                "type": "string"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "date",
              "reason"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-events-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "en_route",
                    "arrived",
                    "completed",
                    "reopened"
                  ]
                },
                "occurred_at": {
                  "type": "string"
                },
                "user_id": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "type",
                "occurred_at",
                "user_id"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-visit-events-en-route-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "event": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "en_route",
                      "arrived",
                      "completed",
                      "reopened"
                    ]
                  },
                  "occurred_at": {
                    "type": "string"
                  },
                  "user_id": {
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "occurred_at",
                  "user_id"
                ]
              },
              "act_id": {
                "type": "integer"
              },
              "act_status": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "completes_act": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "completes_act"
                ]
              },
              "visit_state": {
                "type": "string",
                "enum": [
                  "planned",
                  "en_route",
                  "arrived",
                  "completed"
                ]
              },
              "changed": {
                "type": "boolean"
              }
            },
            "required": [
              "event",
              "act_id",
              "act_status",
              "visit_state",
              "changed"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-media-index-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "visit_id": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "photo",
                    "attachment"
                  ]
                },
                "filename": {
                  "type": "string"
                },
                "mime_type": {
                  "type": "string"
                },
                "size": {
                  "type": "integer"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "string"
                },
                "download_url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "visit_id",
                "kind",
                "filename",
                "mime_type",
                "size",
                "created_at",
                "version",
                "download_url"
              ]
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev": {
                "type": "null"
              }
            },
            "required": [
              "self",
              "next",
              "prev"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "server_time": {
                "type": "string"
              }
            },
            "required": [
              "per_page",
              "has_more",
              "next_cursor",
              "server_time"
            ]
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Response_v1-visit-media-store-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "visit_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "photo",
                  "attachment"
                ]
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "visit_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-media-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "visit_id": {
                "type": "integer"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "photo",
                  "attachment"
                ]
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "visit_id",
              "kind",
              "filename",
              "mime_type",
              "size",
              "created_at",
              "version",
              "download_url"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-route-plans-create-201": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "workshop_id": {
                "type": "integer"
              },
              "user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "visit_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "mode": {
                "type": "string"
              },
              "work_start": {
                "type": "string"
              },
              "work_end": {
                "type": "string"
              },
              "return_to_workshop": {
                "type": "boolean"
              },
              "status": {
                "type": "string"
              },
              "progress": {
                "type": "object",
                "properties": {
                  "completed_steps": {
                    "type": "integer"
                  },
                  "total_steps": {
                    "type": "integer"
                  }
                },
                "required": [
                  "completed_steps",
                  "total_steps"
                ]
              },
              "preview": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "moves": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "visit_id": {
                          "type": "integer"
                        },
                        "crew_user_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "starts_at": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "visit_id",
                        "crew_user_ids",
                        "starts_at",
                        "ends_at"
                      ]
                    }
                  },
                  "unassigned_visit_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "moves",
                  "unassigned_visit_ids"
                ]
              },
              "version": {
                "type": "string"
              },
              "source_version": {
                "type": "string"
              },
              "operation_id": {
                "type": "string"
              },
              "budget": {
                "type": "object",
                "properties": {
                  "max_requests": {
                    "type": "integer"
                  },
                  "max_matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "max_requests",
                  "max_matrix_pairs"
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "requests": {
                    "type": "integer"
                  },
                  "matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "requests",
                  "matrix_pairs"
                ]
              },
              "error": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "id",
              "date",
              "workshop_id",
              "user_ids",
              "visit_ids",
              "mode",
              "work_start",
              "work_end",
              "return_to_workshop",
              "status",
              "progress",
              "preview",
              "version",
              "source_version",
              "operation_id",
              "budget",
              "usage",
              "error"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-route-plans-show-200": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "workshop_id": {
                "type": "integer"
              },
              "user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "visit_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "mode": {
                "type": "string"
              },
              "work_start": {
                "type": "string"
              },
              "work_end": {
                "type": "string"
              },
              "return_to_workshop": {
                "type": "boolean"
              },
              "status": {
                "type": "string"
              },
              "progress": {
                "type": "object",
                "properties": {
                  "completed_steps": {
                    "type": "integer"
                  },
                  "total_steps": {
                    "type": "integer"
                  }
                },
                "required": [
                  "completed_steps",
                  "total_steps"
                ]
              },
              "preview": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "moves": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "visit_id": {
                          "type": "integer"
                        },
                        "crew_user_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "starts_at": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "visit_id",
                        "crew_user_ids",
                        "starts_at",
                        "ends_at"
                      ]
                    }
                  },
                  "unassigned_visit_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "moves",
                  "unassigned_visit_ids"
                ]
              },
              "version": {
                "type": "string"
              },
              "source_version": {
                "type": "string"
              },
              "operation_id": {
                "type": "string"
              },
              "budget": {
                "type": "object",
                "properties": {
                  "max_requests": {
                    "type": "integer"
                  },
                  "max_matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "max_requests",
                  "max_matrix_pairs"
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "requests": {
                    "type": "integer"
                  },
                  "matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "requests",
                  "matrix_pairs"
                ]
              },
              "error": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "id",
              "date",
              "workshop_id",
              "user_ids",
              "visit_ids",
              "mode",
              "work_start",
              "work_end",
              "return_to_workshop",
              "status",
              "progress",
              "preview",
              "version",
              "source_version",
              "operation_id",
              "budget",
              "usage",
              "error"
            ]
          },
          "meta": {
            "type": "object"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Response_v1-visit-route-plans-advance-202": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "workshop_id": {
                "type": "integer"
              },
              "user_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "visit_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "mode": {
                "type": "string"
              },
              "work_start": {
                "type": "string"
              },
              "work_end": {
                "type": "string"
              },
              "return_to_workshop": {
                "type": "boolean"
              },
              "status": {
                "type": "string"
              },
              "progress": {
                "type": "object",
                "properties": {
                  "completed_steps": {
                    "type": "integer"
                  },
                  "total_steps": {
                    "type": "integer"
                  }
                },
                "required": [
                  "completed_steps",
                  "total_steps"
                ]
              },
              "preview": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "moves": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "visit_id": {
                          "type": "integer"
                        },
                        "crew_user_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          }
                        },
                        "starts_at": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "visit_id",
                        "crew_user_ids",
                        "starts_at",
                        "ends_at"
                      ]
                    }
                  },
                  "unassigned_visit_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "moves",
                  "unassigned_visit_ids"
                ]
              },
              "version": {
                "type": "string"
              },
              "source_version": {
                "type": "string"
              },
              "operation_id": {
                "type": "string"
              },
              "budget": {
                "type": "object",
                "properties": {
                  "max_requests": {
                    "type": "integer"
                  },
                  "max_matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "max_requests",
                  "max_matrix_pairs"
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "requests": {
                    "type": "integer"
                  },
                  "matrix_pairs": {
                    "type": "integer"
                  }
                },
                "required": [
                  "requests",
                  "matrix_pairs"
                ]
              },
              "error": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "state",
              "id",
              "date",
              "workshop_id",
              "user_ids",
              "visit_ids",
              "mode",
              "work_start",
              "work_end",
              "return_to_workshop",
              "status",
              "progress",
              "preview",
              "version",
              "source_version",
              "operation_id",
              "budget",
              "usage",
              "error"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "operation_id": {
                "type": "string"
              },
              "affected_resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "version",
                    "deleted"
                  ]
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "resource_refs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "id": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "resource_refs"
                  ]
                }
              }
            },
            "required": [
              "operation_id",
              "affected_resources",
              "warnings"
            ]
          }
        },
        "required": [
          "data",
          "meta"
        ]
      }
    }
  },
  "x-document-date": "2026-11-04"
}
