{
  "openapi": "3.0.3",
  "info": {
    "title": "Survey(e)r API",
    "version": "1.0.0",
    "description": "Creates vehicle inspections and losses and returns their results to the insurer. The insurer activates or cancels the policy, and pays, in its own system."
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Key of the insurer (sk_live_…) or of a partner (pk_live_…)"
      }
    },
    "schemas": {}
  },
  "paths": {
    "/v1/inspections": {
      "post": {
        "summary": "Create an inspection",
        "tags": ["Inspections"],
        "description": "Call after the policy has been paid. The answer carries the link to send to the client. Send `Idempotency-Key` so that a repeated request does not create a second inspection.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "policyNumber": {
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "clientName": {
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "clientPhone": {
                    "pattern": "^\\+[0-9]{9,15}$",
                    "description": "International format, for example +998901234567",
                    "type": "string"
                  },
                  "vehicle": {
                    "additionalProperties": false,
                    "type": "object",
                    "properties": {
                      "make": {
                        "minLength": 1,
                        "maxLength": 60,
                        "type": "string"
                      },
                      "model": {
                        "minLength": 1,
                        "maxLength": 60,
                        "type": "string"
                      },
                      "year": {
                        "minimum": 1950,
                        "maximum": 2100,
                        "type": "integer"
                      },
                      "vin": {
                        "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                        "description": "17 characters, Latin capitals and digits, without I, O and Q",
                        "type": "string"
                      },
                      "plate": {
                        "minLength": 4,
                        "maxLength": 12,
                        "type": "string",
                        "nullable": true
                      },
                      "newWithoutPlates": {
                        "default": false,
                        "type": "boolean"
                      },
                      "panoramicRoof": {
                        "default": false,
                        "type": "boolean"
                      },
                      "marketPriceUsd": {
                        "minimum": 0.01,
                        "maximum": 9999999999.99,
                        "description": "Market price as determined by the insurer. Used by the routing rules.",
                        "type": "number"
                      }
                    },
                    "required": [
                      "make",
                      "model",
                      "year",
                      "vin",
                      "plate",
                      "newWithoutPlates",
                      "panoramicRoof",
                      "marketPriceUsd"
                    ]
                  },
                  "salesChannel": {
                    "type": "string",
                    "enum": ["site", "partner", "dealer", "agent", "office"]
                  },
                  "unit": {
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "The unit of the insurer the inspection belongs to, by its name as set up in the desk. Without it, the inspection takes the unit of the API key.",
                    "type": "string"
                  }
                },
                "required": ["policyNumber", "clientName", "clientPhone", "vehicle", "salesChannel"]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "minLength": 8,
              "maxLength": 128,
              "type": "string"
            },
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "description": "Any unique string. A repeated request with the same key returns the inspection created the first time instead of creating another one."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "OSM-2026-000128"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "created",
                        "capturing",
                        "submitted",
                        "prescreening",
                        "in_review",
                        "revision",
                        "rejection_pending",
                        "act_pending",
                        "dispute",
                        "callback",
                        "signed",
                        "rejected",
                        "unresolved",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "under_review",
                        "retake_required",
                        "act_ready",
                        "passed",
                        "not_passed"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        },
                        "newWithoutPlates": {
                          "default": false,
                          "type": "boolean"
                        },
                        "panoramicRoof": {
                          "default": false,
                          "type": "boolean"
                        },
                        "marketPriceUsd": {
                          "minimum": 0.01,
                          "maximum": 9999999999.99,
                          "description": "Market price as determined by the insurer. Used by the routing rules.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "make",
                        "model",
                        "year",
                        "vin",
                        "plate",
                        "newWithoutPlates",
                        "panoramicRoof",
                        "marketPriceUsd"
                      ]
                    },
                    "salesChannel": {
                      "type": "string",
                      "enum": ["site", "partner", "dealer", "agent", "office"]
                    },
                    "route": {
                      "type": "string",
                      "enum": ["automatic", "manual", "senior_review"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "vehicle",
                    "salesChannel",
                    "route",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "OSM-2026-000128"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "created",
                        "capturing",
                        "submitted",
                        "prescreening",
                        "in_review",
                        "revision",
                        "rejection_pending",
                        "act_pending",
                        "dispute",
                        "callback",
                        "signed",
                        "rejected",
                        "unresolved",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "under_review",
                        "retake_required",
                        "act_ready",
                        "passed",
                        "not_passed"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        },
                        "newWithoutPlates": {
                          "default": false,
                          "type": "boolean"
                        },
                        "panoramicRoof": {
                          "default": false,
                          "type": "boolean"
                        },
                        "marketPriceUsd": {
                          "minimum": 0.01,
                          "maximum": 9999999999.99,
                          "description": "Market price as determined by the insurer. Used by the routing rules.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "make",
                        "model",
                        "year",
                        "vin",
                        "plate",
                        "newWithoutPlates",
                        "panoramicRoof",
                        "marketPriceUsd"
                      ]
                    },
                    "salesChannel": {
                      "type": "string",
                      "enum": ["site", "partner", "dealer", "agent", "office"]
                    },
                    "route": {
                      "type": "string",
                      "enum": ["automatic", "manual", "senior_review"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "vehicle",
                    "salesChannel",
                    "route",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List inspections",
        "tags": ["Inspections"],
        "description": "Ordered by the time of the last change, oldest first. To follow changes, keep the `updatedAt` of the last inspection received and pass it as `updatedSince`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "capturing",
                "submitted",
                "prescreening",
                "in_review",
                "revision",
                "rejection_pending",
                "act_pending",
                "dispute",
                "callback",
                "signed",
                "rejected",
                "unresolved",
                "expired",
                "delivered"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "updatedSince",
            "required": false
          },
          {
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "integer"
            },
            "in": "query",
            "name": "limit",
            "required": true
          },
          {
            "schema": {
              "maxLength": 80,
              "pattern": "^(?:[0-9T:.Z-]{20,30}~)?[0-9a-fA-F-]{36}$",
              "type": "string"
            },
            "in": "query",
            "name": "after",
            "required": false,
            "description": "The `next` of the previous page, as it was given."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "number": {
                            "type": "string",
                            "example": "OSM-2026-000128"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "created",
                              "capturing",
                              "submitted",
                              "prescreening",
                              "in_review",
                              "revision",
                              "rejection_pending",
                              "act_pending",
                              "dispute",
                              "callback",
                              "signed",
                              "rejected",
                              "unresolved",
                              "expired",
                              "delivered"
                            ]
                          },
                          "clientStatus": {
                            "type": "string",
                            "enum": [
                              "awaiting_photos",
                              "under_review",
                              "retake_required",
                              "act_ready",
                              "passed",
                              "not_passed"
                            ]
                          },
                          "policyNumber": {
                            "type": "string"
                          },
                          "clientName": {
                            "type": "string"
                          },
                          "clientPhone": {
                            "type": "string"
                          },
                          "vehicle": {
                            "additionalProperties": false,
                            "type": "object",
                            "properties": {
                              "make": {
                                "minLength": 1,
                                "maxLength": 60,
                                "type": "string"
                              },
                              "model": {
                                "minLength": 1,
                                "maxLength": 60,
                                "type": "string"
                              },
                              "year": {
                                "minimum": 1950,
                                "maximum": 2100,
                                "type": "integer"
                              },
                              "vin": {
                                "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                                "description": "17 characters, Latin capitals and digits, without I, O and Q",
                                "type": "string"
                              },
                              "plate": {
                                "minLength": 4,
                                "maxLength": 12,
                                "type": "string",
                                "nullable": true
                              },
                              "newWithoutPlates": {
                                "default": false,
                                "type": "boolean"
                              },
                              "panoramicRoof": {
                                "default": false,
                                "type": "boolean"
                              },
                              "marketPriceUsd": {
                                "minimum": 0.01,
                                "maximum": 9999999999.99,
                                "description": "Market price as determined by the insurer. Used by the routing rules.",
                                "type": "number"
                              }
                            },
                            "required": [
                              "make",
                              "model",
                              "year",
                              "vin",
                              "plate",
                              "newWithoutPlates",
                              "panoramicRoof",
                              "marketPriceUsd"
                            ]
                          },
                          "salesChannel": {
                            "type": "string",
                            "enum": ["site", "partner", "dealer", "agent", "office"]
                          },
                          "route": {
                            "type": "string",
                            "enum": ["automatic", "manual", "senior_review"],
                            "nullable": true
                          },
                          "link": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "format": "uri",
                                "description": "Address to send to the client",
                                "type": "string"
                              },
                              "expiresAt": {
                                "format": "date-time",
                                "type": "string"
                              }
                            },
                            "required": ["url", "expiresAt"]
                          },
                          "revision": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "status",
                          "clientStatus",
                          "policyNumber",
                          "clientName",
                          "clientPhone",
                          "vehicle",
                          "salesChannel",
                          "route",
                          "link",
                          "revision",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "next": {
                      "description": "Pass as `after` to get the next page. Null on the last page.",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": ["items", "next"]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspections/{id}": {
      "get": {
        "summary": "Get an inspection",
        "tags": ["Inspections"],
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "OSM-2026-000128"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "created",
                        "capturing",
                        "submitted",
                        "prescreening",
                        "in_review",
                        "revision",
                        "rejection_pending",
                        "act_pending",
                        "dispute",
                        "callback",
                        "signed",
                        "rejected",
                        "unresolved",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "under_review",
                        "retake_required",
                        "act_ready",
                        "passed",
                        "not_passed"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        },
                        "newWithoutPlates": {
                          "default": false,
                          "type": "boolean"
                        },
                        "panoramicRoof": {
                          "default": false,
                          "type": "boolean"
                        },
                        "marketPriceUsd": {
                          "minimum": 0.01,
                          "maximum": 9999999999.99,
                          "description": "Market price as determined by the insurer. Used by the routing rules.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "make",
                        "model",
                        "year",
                        "vin",
                        "plate",
                        "newWithoutPlates",
                        "panoramicRoof",
                        "marketPriceUsd"
                      ]
                    },
                    "salesChannel": {
                      "type": "string",
                      "enum": ["site", "partner", "dealer", "agent", "office"]
                    },
                    "route": {
                      "type": "string",
                      "enum": ["automatic", "manual", "senior_review"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "vehicle",
                    "salesChannel",
                    "route",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspections/{id}/result": {
      "get": {
        "summary": "Get the result",
        "tags": ["Results"],
        "description": "Available once the inspection is `signed`, `rejected` or `unresolved`. Reading the result changes nothing; acknowledge receipt with a separate request.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inspection": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "number": {
                          "type": "string",
                          "example": "OSM-2026-000128"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "created",
                            "capturing",
                            "submitted",
                            "prescreening",
                            "in_review",
                            "revision",
                            "rejection_pending",
                            "act_pending",
                            "dispute",
                            "callback",
                            "signed",
                            "rejected",
                            "unresolved",
                            "expired",
                            "delivered"
                          ]
                        },
                        "clientStatus": {
                          "type": "string",
                          "enum": [
                            "awaiting_photos",
                            "under_review",
                            "retake_required",
                            "act_ready",
                            "passed",
                            "not_passed"
                          ]
                        },
                        "policyNumber": {
                          "type": "string"
                        },
                        "clientName": {
                          "type": "string"
                        },
                        "clientPhone": {
                          "type": "string"
                        },
                        "vehicle": {
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "make": {
                              "minLength": 1,
                              "maxLength": 60,
                              "type": "string"
                            },
                            "model": {
                              "minLength": 1,
                              "maxLength": 60,
                              "type": "string"
                            },
                            "year": {
                              "minimum": 1950,
                              "maximum": 2100,
                              "type": "integer"
                            },
                            "vin": {
                              "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                              "description": "17 characters, Latin capitals and digits, without I, O and Q",
                              "type": "string"
                            },
                            "plate": {
                              "minLength": 4,
                              "maxLength": 12,
                              "type": "string",
                              "nullable": true
                            },
                            "newWithoutPlates": {
                              "default": false,
                              "type": "boolean"
                            },
                            "panoramicRoof": {
                              "default": false,
                              "type": "boolean"
                            },
                            "marketPriceUsd": {
                              "minimum": 0.01,
                              "maximum": 9999999999.99,
                              "description": "Market price as determined by the insurer. Used by the routing rules.",
                              "type": "number"
                            }
                          },
                          "required": [
                            "make",
                            "model",
                            "year",
                            "vin",
                            "plate",
                            "newWithoutPlates",
                            "panoramicRoof",
                            "marketPriceUsd"
                          ]
                        },
                        "salesChannel": {
                          "type": "string",
                          "enum": ["site", "partner", "dealer", "agent", "office"]
                        },
                        "route": {
                          "type": "string",
                          "enum": ["automatic", "manual", "senior_review"],
                          "nullable": true
                        },
                        "link": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "format": "uri",
                              "description": "Address to send to the client",
                              "type": "string"
                            },
                            "expiresAt": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": ["url", "expiresAt"]
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "number",
                        "status",
                        "clientStatus",
                        "policyNumber",
                        "clientName",
                        "clientPhone",
                        "vehicle",
                        "salesChannel",
                        "route",
                        "link",
                        "revision",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": ["signed", "rejected", "unresolved"]
                    },
                    "decision": {
                      "type": "object",
                      "properties": {
                        "route": {
                          "type": "string",
                          "enum": ["automatic", "manual", "senior_review"],
                          "nullable": true
                        },
                        "ruleSetVersion": {
                          "type": "integer",
                          "nullable": true
                        },
                        "ruleId": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["route", "ruleSetVersion", "ruleId"]
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "front",
                              "rear",
                              "left",
                              "right",
                              "roof",
                              "vin",
                              "odometer",
                              "license_front",
                              "license_back",
                              "registration_front",
                              "registration_back",
                              "panoramic_roof",
                              "damage_1",
                              "damage_2",
                              "damage_3"
                            ]
                          },
                          "version": {
                            "description": "Grows with every retake",
                            "type": "integer"
                          },
                          "current": {
                            "description": "False for a photo that was retaken later",
                            "type": "boolean"
                          },
                          "sha256": {
                            "pattern": "^[0-9a-f]{64}$",
                            "description": "Checksum of the file",
                            "type": "string"
                          },
                          "sizeBytes": {
                            "type": "integer"
                          },
                          "capturedAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "latitude": {
                                "type": "number"
                              },
                              "longitude": {
                                "type": "number"
                              }
                            },
                            "required": ["latitude", "longitude"],
                            "nullable": true
                          },
                          "device": {
                            "type": "string",
                            "nullable": true
                          },
                          "href": {
                            "description": "Address of the file, relative to the API root",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "version",
                          "current",
                          "sha256",
                          "sizeBytes",
                          "capturedAt",
                          "location",
                          "device",
                          "href"
                        ]
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": ["client", "staff", "insurer_system", "partner", "system"]
                              },
                              "id": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": ["kind", "id"]
                          },
                          "action": {
                            "type": "string",
                            "example": "inspection.approve"
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": ["at", "actor", "action", "details"]
                      }
                    },
                    "act": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "string",
                          "example": "AKT-2026-000128"
                        },
                        "version": {
                          "description": "Grows when a dispute changes the act",
                          "type": "integer"
                        },
                        "issuedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "noDamage": {
                          "type": "boolean"
                        },
                        "damages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "example": "scratch"
                              },
                              "part": {
                                "type": "string",
                                "example": "front_left_door"
                              },
                              "photoId": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "comment": {
                                "type": "string"
                              },
                              "area": {
                                "description": "Place on the photo, as fractions of its width and height",
                                "type": "object",
                                "properties": {
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  },
                                  "width": {
                                    "type": "number"
                                  },
                                  "height": {
                                    "type": "number"
                                  }
                                },
                                "required": ["x", "y", "width", "height"]
                              }
                            },
                            "required": ["kind", "part", "photoId", "comment", "area"]
                          }
                        },
                        "signedAt": {
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        },
                        "sha256": {
                          "description": "Checksum of the signed PDF",
                          "type": "string",
                          "nullable": true
                        },
                        "href": {
                          "description": "Address of the signed PDF",
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "number",
                        "version",
                        "issuedAt",
                        "noDamage",
                        "damages",
                        "signedAt",
                        "sha256",
                        "href"
                      ],
                      "nullable": true
                    },
                    "readings": {
                      "description": "What was read from the photos in force. The mileage has no verdict.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": ["plate", "vin", "odometer"]
                          },
                          "photoId": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": ["pending", "done", "failed"]
                          },
                          "expected": {
                            "description": "The value stated in the request",
                            "type": "string",
                            "nullable": true
                          },
                          "value": {
                            "description": "The value read from the photo",
                            "type": "string",
                            "nullable": true
                          },
                          "confidence": {
                            "minimum": 0,
                            "maximum": 1,
                            "type": "number",
                            "nullable": true
                          },
                          "verdict": {
                            "type": "string",
                            "enum": ["match", "close", "mismatch", "unreadable"],
                            "nullable": true
                          }
                        },
                        "required": [
                          "kind",
                          "photoId",
                          "state",
                          "expected",
                          "value",
                          "confidence",
                          "verdict"
                        ]
                      }
                    },
                    "signals": {
                      "description": "Signs that called for a closer look. Each carries details of its own.",
                      "type": "array",
                      "items": {
                        "additionalProperties": true,
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": ["code"]
                      }
                    },
                    "parts": {
                      "description": "What the result carries. A part the insurer chose not to receive is left empty and is not named here.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["act", "photos", "damages", "readings", "signals", "history"]
                      }
                    },
                    "collected": {
                      "description": "True once receipt has been acknowledged",
                      "type": "boolean"
                    },
                    "filesRemovedAt": {
                      "format": "date-time",
                      "description": "Set once the photos and the act were removed at the end of their term. The record stays; the files are answered with 410.",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "inspection",
                    "outcome",
                    "decision",
                    "photos",
                    "history",
                    "act",
                    "readings",
                    "signals",
                    "parts",
                    "collected",
                    "filesRemovedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspections/{id}/photos/{photoId}": {
      "get": {
        "summary": "Download a photo",
        "tags": ["Results"],
        "description": "The original file as the client sent it. Compare its SHA-256 with the `sha256` given in the result to make sure the file arrived unchanged.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "photoId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "JPEG file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "JPEG file"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspections/{id}/act": {
      "get": {
        "summary": "Download the signed act",
        "tags": ["Results"],
        "description": "The act as the client signed it, as a PDF. Compare its SHA-256 with `act.sha256` given in the result.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "PDF file"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/inspections/{id}/result/acknowledge": {
      "post": {
        "summary": "Acknowledge receipt of the result",
        "tags": ["Results"],
        "description": "Call after the act, the photos and the data have been saved in the policy record. The inspection becomes `delivered`. Repeating the call is safe.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "OSM-2026-000128"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "created",
                        "capturing",
                        "submitted",
                        "prescreening",
                        "in_review",
                        "revision",
                        "rejection_pending",
                        "act_pending",
                        "dispute",
                        "callback",
                        "signed",
                        "rejected",
                        "unresolved",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "under_review",
                        "retake_required",
                        "act_ready",
                        "passed",
                        "not_passed"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        },
                        "newWithoutPlates": {
                          "default": false,
                          "type": "boolean"
                        },
                        "panoramicRoof": {
                          "default": false,
                          "type": "boolean"
                        },
                        "marketPriceUsd": {
                          "minimum": 0.01,
                          "maximum": 9999999999.99,
                          "description": "Market price as determined by the insurer. Used by the routing rules.",
                          "type": "number"
                        }
                      },
                      "required": [
                        "make",
                        "model",
                        "year",
                        "vin",
                        "plate",
                        "newWithoutPlates",
                        "panoramicRoof",
                        "marketPriceUsd"
                      ]
                    },
                    "salesChannel": {
                      "type": "string",
                      "enum": ["site", "partner", "dealer", "agent", "office"]
                    },
                    "route": {
                      "type": "string",
                      "enum": ["automatic", "manual", "senior_review"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "vehicle",
                    "salesChannel",
                    "route",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims": {
      "post": {
        "summary": "Report a loss",
        "tags": ["Losses"],
        "description": "Call when the client has reported an event under a casco policy: from the call centre, the site or the insurer’s own system. The answer carries the link the client is sent by SMS. From what the client told, the rules of the insurer propose a path; people hurt, a theft or a third party hand the loss to the usual process at once. Send `Idempotency-Key` so that a repeated request does not create a second loss.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "policyNumber": {
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "clientName": {
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "clientPhone": {
                    "pattern": "^\\+[0-9]{9,15}$",
                    "description": "International format, for example +998901234567",
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "enum": ["uz", "ru"],
                    "description": "The language of the messages to the client. Uzbek unless said otherwise."
                  },
                  "vehicle": {
                    "additionalProperties": false,
                    "type": "object",
                    "properties": {
                      "make": {
                        "minLength": 1,
                        "maxLength": 60,
                        "type": "string"
                      },
                      "model": {
                        "minLength": 1,
                        "maxLength": 60,
                        "type": "string"
                      },
                      "year": {
                        "minimum": 1950,
                        "maximum": 2100,
                        "type": "integer"
                      },
                      "vin": {
                        "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                        "description": "17 characters, Latin capitals and digits, without I, O and Q",
                        "type": "string"
                      },
                      "plate": {
                        "minLength": 4,
                        "maxLength": 12,
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": ["make", "model", "year", "vin", "plate"]
                  },
                  "event": {
                    "additionalProperties": false,
                    "type": "object",
                    "properties": {
                      "at": {
                        "format": "date-time",
                        "description": "When the event happened",
                        "type": "string"
                      },
                      "place": {
                        "minLength": 1,
                        "maxLength": 200,
                        "type": "string",
                        "nullable": true
                      },
                      "thirdParties": {
                        "default": false,
                        "description": "Another vehicle or person was involved",
                        "type": "boolean"
                      },
                      "theft": {
                        "default": false,
                        "type": "boolean"
                      },
                      "injuries": {
                        "default": false,
                        "description": "Somebody was hurt",
                        "type": "boolean"
                      }
                    },
                    "required": ["at", "thirdParties", "theft", "injuries"]
                  },
                  "unit": {
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "The unit of the insurer the loss belongs to, by its name as set up in the desk. Without it, the loss takes the unit of the API key.",
                    "type": "string"
                  }
                },
                "required": ["policyNumber", "clientName", "clientPhone", "vehicle", "event"]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "minLength": 8,
              "maxLength": 128,
              "type": "string"
            },
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "description": "Any unique string. A repeated request with the same key returns the inspection created the first time instead of creating another one."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "UB-2026-000041"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "awaiting_photos",
                        "submitted",
                        "awaiting_visit",
                        "visit_assigned",
                        "estimating",
                        "approval_pending",
                        "offer_made",
                        "settling",
                        "settled",
                        "in_person",
                        "declined",
                        "stopped",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "being_estimated",
                        "adjuster_on_the_way",
                        "offer_ready",
                        "being_paid",
                        "settled",
                        "with_insurer",
                        "expired"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string",
                      "enum": ["uz", "ru"]
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["make", "model", "year", "vin", "plate"]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "place": {
                          "type": "string",
                          "nullable": true
                        },
                        "thirdParties": {
                          "type": "boolean"
                        },
                        "theft": {
                          "type": "boolean"
                        },
                        "injuries": {
                          "type": "boolean"
                        }
                      },
                      "required": ["at", "place", "thirdParties", "theft", "injuries"]
                    },
                    "path": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "proposedPath": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "pathReason": {
                      "type": "string",
                      "nullable": true,
                      "example": "small_loss"
                    },
                    "offer": {
                      "type": "object",
                      "properties": {
                        "sumUzs": {
                          "description": "What the client is offered, in sums",
                          "type": "number"
                        },
                        "estimateUzs": {
                          "type": "number",
                          "nullable": true
                        },
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "language",
                    "vehicle",
                    "event",
                    "path",
                    "proposedPath",
                    "pathReason",
                    "offer",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "UB-2026-000041"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "awaiting_photos",
                        "submitted",
                        "awaiting_visit",
                        "visit_assigned",
                        "estimating",
                        "approval_pending",
                        "offer_made",
                        "settling",
                        "settled",
                        "in_person",
                        "declined",
                        "stopped",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "being_estimated",
                        "adjuster_on_the_way",
                        "offer_ready",
                        "being_paid",
                        "settled",
                        "with_insurer",
                        "expired"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string",
                      "enum": ["uz", "ru"]
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["make", "model", "year", "vin", "plate"]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "place": {
                          "type": "string",
                          "nullable": true
                        },
                        "thirdParties": {
                          "type": "boolean"
                        },
                        "theft": {
                          "type": "boolean"
                        },
                        "injuries": {
                          "type": "boolean"
                        }
                      },
                      "required": ["at", "place", "thirdParties", "theft", "injuries"]
                    },
                    "path": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "proposedPath": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "pathReason": {
                      "type": "string",
                      "nullable": true,
                      "example": "small_loss"
                    },
                    "offer": {
                      "type": "object",
                      "properties": {
                        "sumUzs": {
                          "description": "What the client is offered, in sums",
                          "type": "number"
                        },
                        "estimateUzs": {
                          "type": "number",
                          "nullable": true
                        },
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "language",
                    "vehicle",
                    "event",
                    "path",
                    "proposedPath",
                    "pathReason",
                    "offer",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List losses",
        "tags": ["Losses"],
        "description": "Ordered by the time of the last change, oldest first. To follow changes, keep the `updatedAt` of the last loss received and pass it as `updatedSince`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "opened",
                "awaiting_photos",
                "submitted",
                "awaiting_visit",
                "visit_assigned",
                "estimating",
                "approval_pending",
                "offer_made",
                "settling",
                "settled",
                "in_person",
                "declined",
                "stopped",
                "expired",
                "delivered"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "updatedSince",
            "required": false
          },
          {
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "integer"
            },
            "in": "query",
            "name": "limit",
            "required": true
          },
          {
            "schema": {
              "maxLength": 80,
              "pattern": "^(?:[0-9T:.Z-]{20,30}~)?[0-9a-fA-F-]{36}$",
              "type": "string"
            },
            "in": "query",
            "name": "after",
            "required": false,
            "description": "The `next` of the previous page, as it was given."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "number": {
                            "type": "string",
                            "example": "UB-2026-000041"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "opened",
                              "awaiting_photos",
                              "submitted",
                              "awaiting_visit",
                              "visit_assigned",
                              "estimating",
                              "approval_pending",
                              "offer_made",
                              "settling",
                              "settled",
                              "in_person",
                              "declined",
                              "stopped",
                              "expired",
                              "delivered"
                            ]
                          },
                          "clientStatus": {
                            "type": "string",
                            "enum": [
                              "awaiting_photos",
                              "being_estimated",
                              "adjuster_on_the_way",
                              "offer_ready",
                              "being_paid",
                              "settled",
                              "with_insurer",
                              "expired"
                            ]
                          },
                          "policyNumber": {
                            "type": "string"
                          },
                          "clientName": {
                            "type": "string"
                          },
                          "clientPhone": {
                            "type": "string"
                          },
                          "language": {
                            "type": "string",
                            "enum": ["uz", "ru"]
                          },
                          "vehicle": {
                            "additionalProperties": false,
                            "type": "object",
                            "properties": {
                              "make": {
                                "minLength": 1,
                                "maxLength": 60,
                                "type": "string"
                              },
                              "model": {
                                "minLength": 1,
                                "maxLength": 60,
                                "type": "string"
                              },
                              "year": {
                                "minimum": 1950,
                                "maximum": 2100,
                                "type": "integer"
                              },
                              "vin": {
                                "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                                "description": "17 characters, Latin capitals and digits, without I, O and Q",
                                "type": "string"
                              },
                              "plate": {
                                "minLength": 4,
                                "maxLength": 12,
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": ["make", "model", "year", "vin", "plate"]
                          },
                          "event": {
                            "type": "object",
                            "properties": {
                              "at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "place": {
                                "type": "string",
                                "nullable": true
                              },
                              "thirdParties": {
                                "type": "boolean"
                              },
                              "theft": {
                                "type": "boolean"
                              },
                              "injuries": {
                                "type": "boolean"
                              }
                            },
                            "required": ["at", "place", "thirdParties", "theft", "injuries"]
                          },
                          "path": {
                            "type": "string",
                            "enum": ["remote", "visit", "in_person"],
                            "nullable": true
                          },
                          "proposedPath": {
                            "type": "string",
                            "enum": ["remote", "visit", "in_person"],
                            "nullable": true
                          },
                          "pathReason": {
                            "type": "string",
                            "nullable": true,
                            "example": "small_loss"
                          },
                          "offer": {
                            "type": "object",
                            "properties": {
                              "sumUzs": {
                                "description": "What the client is offered, in sums",
                                "type": "number"
                              },
                              "estimateUzs": {
                                "type": "number",
                                "nullable": true
                              },
                              "at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "expiresAt": {
                                "format": "date-time",
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                            "nullable": true
                          },
                          "link": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "format": "uri",
                                "description": "Address to send to the client",
                                "type": "string"
                              },
                              "expiresAt": {
                                "format": "date-time",
                                "type": "string"
                              }
                            },
                            "required": ["url", "expiresAt"]
                          },
                          "revision": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "status",
                          "clientStatus",
                          "policyNumber",
                          "clientName",
                          "clientPhone",
                          "language",
                          "vehicle",
                          "event",
                          "path",
                          "proposedPath",
                          "pathReason",
                          "offer",
                          "link",
                          "revision",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "next": {
                      "description": "Pass as `after` to get the next page. Null on the last page.",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": ["items", "next"]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims/{id}": {
      "get": {
        "summary": "Get a loss",
        "tags": ["Losses"],
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "UB-2026-000041"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "awaiting_photos",
                        "submitted",
                        "awaiting_visit",
                        "visit_assigned",
                        "estimating",
                        "approval_pending",
                        "offer_made",
                        "settling",
                        "settled",
                        "in_person",
                        "declined",
                        "stopped",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "being_estimated",
                        "adjuster_on_the_way",
                        "offer_ready",
                        "being_paid",
                        "settled",
                        "with_insurer",
                        "expired"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string",
                      "enum": ["uz", "ru"]
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["make", "model", "year", "vin", "plate"]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "place": {
                          "type": "string",
                          "nullable": true
                        },
                        "thirdParties": {
                          "type": "boolean"
                        },
                        "theft": {
                          "type": "boolean"
                        },
                        "injuries": {
                          "type": "boolean"
                        }
                      },
                      "required": ["at", "place", "thirdParties", "theft", "injuries"]
                    },
                    "path": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "proposedPath": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "pathReason": {
                      "type": "string",
                      "nullable": true,
                      "example": "small_loss"
                    },
                    "offer": {
                      "type": "object",
                      "properties": {
                        "sumUzs": {
                          "description": "What the client is offered, in sums",
                          "type": "number"
                        },
                        "estimateUzs": {
                          "type": "number",
                          "nullable": true
                        },
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "language",
                    "vehicle",
                    "event",
                    "path",
                    "proposedPath",
                    "pathReason",
                    "offer",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims/{id}/result": {
      "get": {
        "summary": "Get the result of a loss",
        "tags": ["Losses"],
        "description": "Available once the loss is `settled`, `in_person`, `declined` or `stopped`. Reading the result changes nothing; acknowledge receipt with a separate request.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "claim": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "number": {
                          "type": "string",
                          "example": "UB-2026-000041"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "opened",
                            "awaiting_photos",
                            "submitted",
                            "awaiting_visit",
                            "visit_assigned",
                            "estimating",
                            "approval_pending",
                            "offer_made",
                            "settling",
                            "settled",
                            "in_person",
                            "declined",
                            "stopped",
                            "expired",
                            "delivered"
                          ]
                        },
                        "clientStatus": {
                          "type": "string",
                          "enum": [
                            "awaiting_photos",
                            "being_estimated",
                            "adjuster_on_the_way",
                            "offer_ready",
                            "being_paid",
                            "settled",
                            "with_insurer",
                            "expired"
                          ]
                        },
                        "policyNumber": {
                          "type": "string"
                        },
                        "clientName": {
                          "type": "string"
                        },
                        "clientPhone": {
                          "type": "string"
                        },
                        "language": {
                          "type": "string",
                          "enum": ["uz", "ru"]
                        },
                        "vehicle": {
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "make": {
                              "minLength": 1,
                              "maxLength": 60,
                              "type": "string"
                            },
                            "model": {
                              "minLength": 1,
                              "maxLength": 60,
                              "type": "string"
                            },
                            "year": {
                              "minimum": 1950,
                              "maximum": 2100,
                              "type": "integer"
                            },
                            "vin": {
                              "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                              "description": "17 characters, Latin capitals and digits, without I, O and Q",
                              "type": "string"
                            },
                            "plate": {
                              "minLength": 4,
                              "maxLength": 12,
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": ["make", "model", "year", "vin", "plate"]
                        },
                        "event": {
                          "type": "object",
                          "properties": {
                            "at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "place": {
                              "type": "string",
                              "nullable": true
                            },
                            "thirdParties": {
                              "type": "boolean"
                            },
                            "theft": {
                              "type": "boolean"
                            },
                            "injuries": {
                              "type": "boolean"
                            }
                          },
                          "required": ["at", "place", "thirdParties", "theft", "injuries"]
                        },
                        "path": {
                          "type": "string",
                          "enum": ["remote", "visit", "in_person"],
                          "nullable": true
                        },
                        "proposedPath": {
                          "type": "string",
                          "enum": ["remote", "visit", "in_person"],
                          "nullable": true
                        },
                        "pathReason": {
                          "type": "string",
                          "nullable": true,
                          "example": "small_loss"
                        },
                        "offer": {
                          "type": "object",
                          "properties": {
                            "sumUzs": {
                              "description": "What the client is offered, in sums",
                              "type": "number"
                            },
                            "estimateUzs": {
                              "type": "number",
                              "nullable": true
                            },
                            "at": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "expiresAt": {
                              "format": "date-time",
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                          "nullable": true
                        },
                        "link": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "format": "uri",
                              "description": "Address to send to the client",
                              "type": "string"
                            },
                            "expiresAt": {
                              "format": "date-time",
                              "type": "string"
                            }
                          },
                          "required": ["url", "expiresAt"]
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "number",
                        "status",
                        "clientStatus",
                        "policyNumber",
                        "clientName",
                        "clientPhone",
                        "language",
                        "vehicle",
                        "event",
                        "path",
                        "proposedPath",
                        "pathReason",
                        "offer",
                        "link",
                        "revision",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": ["settled", "in_person", "declined", "stopped"]
                    },
                    "path": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "settingsVersion": {
                      "type": "integer",
                      "nullable": true
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "actor": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": ["client", "staff", "insurer_system", "partner", "system"]
                              },
                              "id": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": ["kind", "id"]
                          },
                          "action": {
                            "type": "string",
                            "example": "inspection.approve"
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": ["at", "actor", "action", "details"]
                      }
                    },
                    "collected": {
                      "description": "True once receipt has been acknowledged",
                      "type": "boolean"
                    },
                    "documents": {
                      "description": "The act of the damage, the agreement, the receipt or the referral",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": ["act"]
                              },
                              {
                                "type": "string",
                                "enum": ["agreement"]
                              },
                              {
                                "type": "string",
                                "enum": ["receipt"]
                              },
                              {
                                "type": "string",
                                "enum": ["referral"]
                              }
                            ]
                          },
                          "number": {
                            "type": "string"
                          },
                          "sha256": {
                            "description": "SHA-256 of the PDF, hex",
                            "type": "string"
                          },
                          "bytes": {
                            "type": "integer"
                          }
                        },
                        "required": ["kind", "number", "sha256", "bytes"]
                      }
                    }
                  },
                  "required": [
                    "claim",
                    "outcome",
                    "path",
                    "settingsVersion",
                    "history",
                    "collected",
                    "documents"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims/{id}/documents/{kind}": {
      "get": {
        "summary": "Read a paper of a loss",
        "tags": ["Losses"],
        "description": "The act of the damage, the agreement, the receipt or the referral, as a PDF. The result of the loss lists which of them exist.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["act"]
                },
                {
                  "type": "string",
                  "enum": ["agreement"]
                },
                {
                  "type": "string",
                  "enum": ["receipt"]
                },
                {
                  "type": "string",
                  "enum": ["referral"]
                }
              ]
            },
            "in": "path",
            "name": "kind",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims/{id}/result/acknowledge": {
      "post": {
        "summary": "Acknowledge receipt of the result",
        "tags": ["Losses"],
        "description": "Call after the outcome has been saved in the claim file. The loss becomes `delivered`. Repeating the call is safe.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "number": {
                      "type": "string",
                      "example": "UB-2026-000041"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "awaiting_photos",
                        "submitted",
                        "awaiting_visit",
                        "visit_assigned",
                        "estimating",
                        "approval_pending",
                        "offer_made",
                        "settling",
                        "settled",
                        "in_person",
                        "declined",
                        "stopped",
                        "expired",
                        "delivered"
                      ]
                    },
                    "clientStatus": {
                      "type": "string",
                      "enum": [
                        "awaiting_photos",
                        "being_estimated",
                        "adjuster_on_the_way",
                        "offer_ready",
                        "being_paid",
                        "settled",
                        "with_insurer",
                        "expired"
                      ]
                    },
                    "policyNumber": {
                      "type": "string"
                    },
                    "clientName": {
                      "type": "string"
                    },
                    "clientPhone": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string",
                      "enum": ["uz", "ru"]
                    },
                    "vehicle": {
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "make": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "model": {
                          "minLength": 1,
                          "maxLength": 60,
                          "type": "string"
                        },
                        "year": {
                          "minimum": 1950,
                          "maximum": 2100,
                          "type": "integer"
                        },
                        "vin": {
                          "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                          "description": "17 characters, Latin capitals and digits, without I, O and Q",
                          "type": "string"
                        },
                        "plate": {
                          "minLength": 4,
                          "maxLength": 12,
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["make", "model", "year", "vin", "plate"]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "place": {
                          "type": "string",
                          "nullable": true
                        },
                        "thirdParties": {
                          "type": "boolean"
                        },
                        "theft": {
                          "type": "boolean"
                        },
                        "injuries": {
                          "type": "boolean"
                        }
                      },
                      "required": ["at", "place", "thirdParties", "theft", "injuries"]
                    },
                    "path": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "proposedPath": {
                      "type": "string",
                      "enum": ["remote", "visit", "in_person"],
                      "nullable": true
                    },
                    "pathReason": {
                      "type": "string",
                      "nullable": true,
                      "example": "small_loss"
                    },
                    "offer": {
                      "type": "object",
                      "properties": {
                        "sumUzs": {
                          "description": "What the client is offered, in sums",
                          "type": "number"
                        },
                        "estimateUzs": {
                          "type": "number",
                          "nullable": true
                        },
                        "at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": ["sumUzs", "estimateUzs", "at", "expiresAt"],
                      "nullable": true
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "format": "uri",
                          "description": "Address to send to the client",
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "required": ["url", "expiresAt"]
                    },
                    "revision": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "status",
                    "clientStatus",
                    "policyNumber",
                    "clientName",
                    "clientPhone",
                    "language",
                    "vehicle",
                    "event",
                    "path",
                    "proposedPath",
                    "pathReason",
                    "offer",
                    "link",
                    "revision",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "not_found"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": ["code", "message"]
                    }
                  },
                  "required": ["error"]
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ]
}
