{
  "openapi": "3.0.4",
  "info": {
    "title": "EtaTool Service",
    "description": "The Progi service responsible for etatool.",
    "version": "26.48.1"
  },
  "servers": [
    {
      "url": "https://etatool.pix.api.progi.com"
    }
  ],
  "paths": {
    "/enums": {
      "post": {
        "tags": [
          "Enums"
        ],
        "summary": "Retrieves translated details for specified enumerations based on provided identifiers.",
        "operationId": "ListEnums",
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Scope-ID",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Enums.ListEnumsBody"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Models.Common.Queries.EnumDataModel"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "OpenId": [ ]
          }
        ]
      }
    },
    "/eta/calculate": {
      "post": {
        "tags": [
          "ETA Tool"
        ],
        "summary": "Calculate ETA percentage from vehicle + damage inputs.",
        "operationId": "CalculateEtaRequest",
        "parameters": [
          {
            "name": "Scope-ID",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CalculateEtaRequest.CalculateEtaRequestCommand"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculateEtaRequest.CalculateEtaRequestResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "OpenId": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CalculateEtaRequest.CalculateEtaRequestCommand": {
        "required": [
          "damage",
          "vehicle"
        ],
        "type": "object",
        "properties": {
          "vehicle": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CalculateEtaRequest.Models.EtaVehicleModel"
              }
            ]
          },
          "damage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CalculateEtaRequest.Models.EtaDamageModel"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "CalculateEtaRequest.CalculateEtaRequestResult": {
        "required": [
          "result"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "result": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "CalculateEtaRequest.Models.EtaDamageModel": {
        "required": [
          "numberOfDamagedPanels"
        ],
        "type": "object",
        "properties": {
          "numberOfDamagedPanels": {
            "type": "integer",
            "format": "int32"
          },
          "hasFrontOrRearBrokenParts": {
            "type": "boolean"
          },
          "areAnyAirbagsDeployed": {
            "type": "boolean"
          },
          "hasVehicleRolledOverOrIsRoofDamaged": {
            "type": "boolean"
          },
          "isOneSideDamaged": {
            "type": "boolean"
          },
          "isDashboardDamaged": {
            "type": "boolean"
          },
          "isVehicleNotDrivable": {
            "type": "boolean"
          },
          "areAnyOpeningsNotClosingProperly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CalculateEtaRequest.Models.EtaVehicleModel": {
        "required": [
          "actualCashValue",
          "odometerUnit",
          "vehicleIdentificationNumber",
          "year"
        ],
        "type": "object",
        "properties": {
          "vehicleIdentificationNumber": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "make": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "odometer": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "odometerUnit": {
            "type": "string"
          },
          "actualCashValue": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Enums.ListEnumsBody": {
        "required": [
          "enumIdentifiers"
        ],
        "type": "object",
        "properties": {
          "enumIdentifiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "Models.Common.Queries.EnumDataModel": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "OpenId": {
        "type": "http",
        "description": "An OpenID JSON Web Token issued by the Progi Identity Platform.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Enums"
    },
    {
      "name": "ETA Tool"
    }
  ]
}