{
  "openapi": "3.0.1",
  "info": {
    "title": "Proteco360API | API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://test.api.proteco360.com/"
    }
  ],
  "paths": {
    "/diagnostics/config": {
      "get": {
        "tags": [
          "Diagnostics"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/diagnostics/health": {
      "get": {
        "tags": [
          "Diagnostics"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/diagnostics/data": {
      "get": {
        "tags": [
          "Diagnostics"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/Agency/status": {
      "get": {
        "tags": [
          "Agency"
        ],
        "operationId": "Get current status of agency's contracts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyStatusDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/Auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AuthDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/Contract/replace-all": {
      "post": {
        "tags": [
          "Contract"
        ],
        "operationId": "Removes all existing contracts and saves new ones",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/Contract/delete": {
      "delete": {
        "tags": [
          "Contract"
        ],
        "operationId": "Remove existing contract from database",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractDeleteDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractDeleteDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ContractDeleteDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgencyStatusDto": {
        "type": "object",
        "properties": {
          "contractCount": {
            "type": "integer",
            "format": "int32"
          },
          "matchUnresolved": {
            "type": "integer",
            "format": "int32"
          },
          "matchResolved": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AuthDto": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string"
          }
        }
      },
      "ContractDeleteDto": {
        "type": "object",
        "properties": {
          "ph": {
            "type": "string"
          },
          "psh": {
            "type": "string"
          }
        }
      },
      "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
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Diagnostics"
    },
    {
      "name": "Agency"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Contract"
    }
  ]
}