{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://irz.arimr.gov.pl/api/koniowate",
      "description": "Środowisko produkcyjne IRzplus"
    }
  ],
  "paths": {
    "/zwierze/api/prod/dane": {
      "get": {
        "tags": [
          "dane-zwierzat-koniowatych-api-prod-controller"
        ],
        "operationId": "pobierzDaneKoniowate",
        "parameters": [
          {
            "name": "request",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DaneKoniowategoApiRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaneKoniowategoApiResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "KodOpisWartosciDto": {
        "type": "object",
        "properties": {
          "kod": {
            "type": "string"
          },
          "opis": {
            "type": "string"
          }
        }
      },
      "WylaczenieKoniowategoZLancuchaDTO": {
        "type": "object",
        "properties": {
          "dataOd": {
            "type": "string",
            "format": "date"
          },
          "dataDo": {
            "type": "string",
            "format": "date"
          },
          "podaneLekiWylaczenieKoniowategoZLancuchaZywnosciowego": {
            "type": "boolean"
          },
          "informacjaOPodanychLekachWylaczeniuKoniowategoZLancuchaZywnosciowego": {
            "type": "string"
          },
          "dozywotnio": {
            "type": "boolean"
          }
        }
      },
      "DaneKoniowategoApiRequest": {
        "type": "object",
        "properties": {
          "niepowtarzalnyDozywotniNumerUeln": {
            "type": "string",
            "description": "Numer UELN koniowatego"
          },
          "idKoniowatego": {
            "type": "integer",
            "description": "ID koniowatego",
            "format": "int64"
          },
          "numerKodTranspondera": {
            "type": "string",
            "description": "Numer kodu transpondera"
          }
        },
        "description": "Request pobierania danych koniowatych przez API produkcyjne"
      },
      "DaneKoniowategoApiResponse": {
        "type": "object",
        "properties": {
          "komunikat": {
            "type": "string",
            "description": "Komunikat"
          },
          "idKoniowatego": {
            "type": "string",
            "description": "Id koniowatego"
          },
          "niepowtarzalnyDozywotniNumerUeln": {
            "type": "string",
            "description": "Numer UELN koniowatego"
          },
          "gatunek": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "dataUrodzenia": {
            "type": "string",
            "description": "Data urodzenia",
            "format": "date"
          },
          "plec": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "rasa": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "masc": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "dataWyrejestrowania": {
            "type": "string",
            "description": "Data wyrejestrowania (data uboju w rzeźni lub padnięcia lub uboju lub zabicia lub wywozu do UE lub poza UE, unieszkodliwienia)",
            "format": "date"
          },
          "masaCialaZwierzecia": {
            "type": "number",
            "description": "Masa ciała",
            "format": "double"
          },
          "masaTuszy": {
            "type": "number",
            "description": "Masa tuszy",
            "format": "double"
          },
          "numerDzialalnosci": {
            "type": "string",
            "description": "Numer dzialalnosci (ostania działalności, w której zwierzę było lokalizowane)"
          },
          "numerKodTranspondera": {
            "type": "string",
            "description": "Numer/kod transpondera"
          },
          "wylaczenieKoniowategoZLancucha": {
            "type": "array",
            "description": "Historia wyłączenia z łańcucha żywnościowego",
            "items": {
              "$ref": "#/components/schemas/WylaczenieKoniowategoZLancuchaDTO"
            }
          }
        },
        "description": "Response ponierania danych koniowatego"
      }
    }
  }
}