{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://irz.arimr.gov.pl/api/koniowate",
      "description": "Środowisko produkcyjne IRZplus"
    }
  ],
  "paths": {
    "/dokument/api/prod/wddikon": {
      "post": {
        "tags": [
          "zwierzeta-koniowate-api-prod-controller"
        ],
        "operationId": "zlozDyspozycjeWDDIKON_1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DyspozycjaWDDIKON"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ZlozenieDyspozycjiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dokument/api/prod/ozwkon": {
      "post": {
        "tags": [
          "zwierzeta-koniowate-api-prod-controller"
        ],
        "operationId": "zlozDyspozycjeOZWKON_1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DyspozycjaOZWKON"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ZlozenieDyspozycjiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dokument/api/prod/iwlzkon": {
      "post": {
        "tags": [
          "zwierzeta-koniowate-api-prod-controller"
        ],
        "operationId": "zlozDyspozycjeIWLZKON_1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DyspozycjaIWLZKON"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ZlozenieDyspozycjiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dokument/api/prod/dokumentyZlozone": {
      "get": {
        "tags": [
          "zwierzeta-koniowate-api-prod-controller"
        ],
        "operationId": "pobierzDokument_2",
        "parameters": [
          {
            "name": "request",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PobieranieDokumentuApiRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PobieranieDokumentuResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdresDTO": {
        "type": "object",
        "properties": {
          "kraj": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "wojewodztwo": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "powiat": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "gmina": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "miejscowosc": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "rodzajGminy": {
            "type": "string"
          },
          "ulica": {
            "type": "string"
          },
          "posesja": {
            "type": "string"
          },
          "lokal": {
            "type": "string"
          },
          "kodPocztowy": {
            "type": "string"
          },
          "poczta": {
            "type": "string"
          }
        }
      },
      "KodOpisWartosciDto": {
        "type": "object",
        "properties": {
          "kod": {
            "type": "string"
          },
          "opis": {
            "type": "string"
          }
        }
      },
      "BazowaPozycja": {
        "type": "object",
        "properties": {
          "lp": {
            "type": "integer",
            "format": "int64"
          },
          "statusPozycji": {
            "type": "string",
            "enum": [
              "ZATWIERDZONA",
              "DO_ZATWIERDZENIA",
              "POMINIETA"
            ]
          }
        }
      },
      "BazoweZgloszenie": {
        "type": "object",
        "properties": {
          "pozycje": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BazowaPozycja"
            }
          },
          "czyKorekta": {
            "type": "boolean"
          }
        }
      },
      "WybranaJednostkaOrganizacyjnaDTO": {
        "type": "object",
        "properties": {
          "wojewodztwo": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "powiat": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "jednostkaOrganizacyjna": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          }
        }
      },
      "BladWalidacjiDTO": {
        "type": "object",
        "properties": {
          "kodBledu": {
            "type": "string"
          },
          "komunikat": {
            "type": "string"
          }
        }
      },
      "PozycjaWDDIKONDTO": {
        "type": "object",
        "properties": {
          "lp": {
            "type": "integer",
            "format": "int64"
          },
          "statusPozycji": {
            "type": "string",
            "enum": [
              "ZATWIERDZONA",
              "DO_ZATWIERDZENIA",
              "POMINIETA"
            ]
          },
          "niepowtarzalnyDozywotniNumerUeln": {
            "type": "string"
          },
          "numerKodTranspondera": {
            "type": "string"
          },
          "gatunek": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "przyczynaPrzydzieleniaDuplikatuDokumentuIdentyfikacyjnego": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "kodZwiazkuHodowcowKoniowatych": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "oddzialRegionalnyZwiazku": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "rodzajDokIdentKoniowatego": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "idKoniowatego": {
            "type": "string"
          },
          "sposobOdbioruDokumentuIdentyfikacyjnego": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "imieNazwiskoLubNazwaFirmy": {
            "type": "string"
          },
          "ulica": {
            "type": "string"
          },
          "miejscowosc": {
            "type": "string"
          },
          "numerBudynku": {
            "type": "string"
          },
          "numerLokalu": {
            "type": "string"
          },
          "kodPocztowy": {
            "type": "string"
          },
          "poczta": {
            "type": "string"
          }
        }
      },
      "WniosekWDDIKONDTO": {
        "type": "object",
        "properties": {
          "podpisZglaszajacego": {
            "type": "boolean"
          },
          "pozycje": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PozycjaWDDIKONDTO"
            }
          },
          "czyKorekta": {
            "type": "boolean"
          },
          "dataWystawieniaWniosku": {
            "type": "string",
            "format": "date"
          },
          "jednostkaOrganizacyjna": {
            "$ref": "#/components/schemas/WybranaJednostkaOrganizacyjnaDTO"
          },
          "numerDzialalnosci": {
            "type": "string"
          },
          "zglaszajacy": {
            "type": "string",
            "enum": [
              "wlasciciel",
              "pelnomocnik",
              "posiadacz"
            ]
          },
          "numerWlascicielaKoniowatego": {
            "type": "string"
          },
          "numerPosiadaczaEP": {
            "type": "string"
          },
          "posiadaczJestWlascicielem": {
            "type": "boolean"
          },
          "wlascicielNiePosiadaNumeruProducenta": {
            "type": "boolean"
          },
          "imieLubNazwaSkrocona": {
            "type": "string"
          },
          "nazwiskoLubNazwa": {
            "type": "string"
          },
          "pesel": {
            "type": "string"
          },
          "nip": {
            "type": "string"
          },
          "regon": {
            "type": "string"
          },
          "numerPaszportuLubInnegoDokumentu": {
            "type": "string"
          },
          "telefonStacjonarny": {
            "type": "string"
          },
          "telefonKomorkowy": {
            "type": "string"
          },
          "telefonZagraniczny": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "adresEmail": {
            "type": "string"
          },
          "adres": {
            "$ref": "#/components/schemas/AdresDTO"
          }
        }
      },
      "OswiadczenieOZWKONDTO": {
        "type": "object",
        "properties": {
          "podpisZglaszajacego": {
            "type": "boolean"
          },
          "pozycje": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PozycjaOZWKONDTO"
            }
          },
          "czyKorekta": {
            "type": "boolean"
          },
          "dataWystawieniaWniosku": {
            "type": "string",
            "format": "date"
          },
          "jednostkaOrganizacyjna": {
            "$ref": "#/components/schemas/WybranaJednostkaOrganizacyjnaDTO"
          },
          "numerWlascicielaKoniowatego": {
            "type": "string"
          },
          "numerPosiadaczaEP": {
            "type": "string"
          },
          "posiadaczJestWlascicielem": {
            "type": "boolean"
          },
          "wlascicielNiePosiadaNumeruProducenta": {
            "type": "boolean"
          },
          "imieLubNazwaSkrocona": {
            "type": "string"
          },
          "nazwiskoLubNazwa": {
            "type": "string"
          },
          "pesel": {
            "type": "string"
          },
          "nip": {
            "type": "string"
          },
          "regon": {
            "type": "string"
          },
          "numerPaszportuLubInnegoDokumentu": {
            "type": "string"
          },
          "telefonStacjonarny": {
            "type": "string"
          },
          "telefonKomorkowy": {
            "type": "string"
          },
          "telefonZagraniczny": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "adresEmail": {
            "type": "string"
          },
          "adres": {
            "$ref": "#/components/schemas/AdresDTO"
          }
        }
      },
      "PozycjaOZWKONDTO": {
        "type": "object",
        "properties": {
          "lp": {
            "type": "integer",
            "format": "int64"
          },
          "statusPozycji": {
            "type": "string",
            "enum": [
              "ZATWIERDZONA",
              "DO_ZATWIERDZENIA",
              "POMINIETA"
            ]
          },
          "niepowtarzalnyDozywotniNumerUeln": {
            "type": "string"
          },
          "numerKodTranspondera": {
            "type": "string"
          },
          "gatunek": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "umowaLubOswiadczenieZalacznik": {
            "type": "boolean"
          },
          "dataUmowyLubOswiadczenia": {
            "type": "string",
            "format": "date"
          },
          "idKoniowatego": {
            "type": "integer",
            "format": "int64"
          },
          "numerDzialalnosci": {
            "type": "string"
          }
        }
      },
      "LekarzWeterynariiDTO": {
        "type": "object",
        "properties": {
          "numerLekarzaWeterynarii": {
            "type": "string"
          },
          "imieLubNazwaSkrocona": {
            "type": "string"
          },
          "nazwiskoLubNazwa": {
            "type": "string"
          },
          "wojewodztwo": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          }
        }
      },
      "PozycjaIWLZKONDTO": {
        "type": "object",
        "properties": {
          "lp": {
            "type": "integer",
            "format": "int64"
          },
          "statusPozycji": {
            "type": "string",
            "enum": [
              "ZATWIERDZONA",
              "DO_ZATWIERDZENIA",
              "POMINIETA"
            ]
          },
          "niepowtarzalnyDozywotniNumerUeln": {
            "type": "string"
          },
          "gatunek": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "numerKodTranspondera": {
            "type": "string"
          },
          "dataOswiadczenia": {
            "type": "string",
            "format": "date"
          },
          "dataOd": {
            "type": "string",
            "format": "date"
          },
          "dataDo": {
            "type": "string",
            "format": "date"
          },
          "dozywotnio": {
            "type": "boolean"
          },
          "informacjaOPodanychLekachWylaczeniuKoniowategoZLancuchaZywnosciowego": {
            "type": "string"
          },
          "dataWpisu": {
            "type": "string",
            "format": "date"
          },
          "miejsceWpisu": {
            "type": "string"
          },
          "numerLekarzaWeterynarii": {
            "type": "string"
          },
          "imieNazwiskoLekarzaWeterynarii": {
            "type": "string"
          },
          "nazwaOrganuKtoryDokonalWpisu": {
            "type": "string"
          }
        }
      },
      "PracownikZwiazkuDTO": {
        "type": "object",
        "properties": {
          "imieLubNazwaSkrocona": {
            "type": "string"
          },
          "nazwiskoLubNazwa": {
            "type": "string"
          },
          "kodZwiazkuHodowcowKoniowatych": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "oddzialRegionalnyZwiazku": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          }
        }
      },
      "ZgloszenieIWLZKONDTO": {
        "type": "object",
        "properties": {
          "pozycje": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PozycjaIWLZKONDTO"
            }
          },
          "czyKorekta": {
            "type": "boolean"
          },
          "dataWystawieniaWniosku": {
            "type": "string",
            "format": "date"
          },
          "wystawiajacyOswiadczenie": {
            "$ref": "#/components/schemas/KodOpisWartosciDto"
          },
          "jednostkaOrganizacyjna": {
            "$ref": "#/components/schemas/WybranaJednostkaOrganizacyjnaDTO"
          },
          "numerWlascicielaKoniowatego": {
            "type": "string"
          },
          "numerPosiadaczaEP": {
            "type": "string"
          },
          "posiadaczJestWlascicielem": {
            "type": "boolean"
          },
          "wlascicielNiePosiadaNumeruProducenta": {
            "type": "boolean"
          },
          "imieLubNazwaSkrocona": {
            "type": "string"
          },
          "nazwiskoLubNazwa": {
            "type": "string"
          },
          "pesel": {
            "type": "string"
          },
          "nip": {
            "type": "string"
          },
          "regon": {
            "type": "string"
          },
          "numerPaszportuLubInnegoDokumentu": {
            "type": "string"
          },
          "telefonStacjonarny": {
            "type": "string"
          },
          "telefonKomorkowy": {
            "type": "string"
          },
          "telefonZagraniczny": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "adresEmail": {
            "type": "string"
          },
          "adres": {
            "$ref": "#/components/schemas/AdresDTO"
          },
          "lekarzWeterynarii": {
            "$ref": "#/components/schemas/LekarzWeterynariiDTO"
          },
          "pracownikZwiazku": {
            "$ref": "#/components/schemas/PracownikZwiazkuDTO"
          },
          "numerDzialalnosci": {
            "type": "string"
          }
        }
      },
      "ZlozenieDyspozycjiResponse": {
        "type": "object",
        "properties": {
          "komunikat": {
            "type": "string"
          },
          "bledy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BladWalidacjiDTO"
            }
          },
          "numerDokumentu": {
            "type": "string"
          }
        }
      },
      "DyspozycjaWDDIKON": {
        "required": [
          "numerProducenta",
          "zgloszenie"
        ],
        "type": "object",
        "properties": {
          "komorkaOrganizacyjna": {
            "type": "string",
            "description": "Komórka organizacyjna ARiMR, do której składana jest dyspozycja"
          },
          "numerProducenta": {
            "type": "string",
            "description": "Numer producenta, który składa dyspozycję"
          },
          "zgloszenie": {
            "$ref": "#/components/schemas/WniosekWDDIKONDTO"
          }
        }
      },
      "DyspozycjaOZWKON": {
        "required": [
          "numerProducenta",
          "zgloszenie"
        ],
        "type": "object",
        "properties": {
          "komorkaOrganizacyjna": {
            "type": "string",
            "description": "Komórka organizacyjna ARiMR, do której składana jest dyspozycja"
          },
          "numerProducenta": {
            "type": "string",
            "description": "Numer producenta, który składa dyspozycję"
          },
          "zgloszenie": {
            "$ref": "#/components/schemas/OswiadczenieOZWKONDTO"
          }
        }
      },
      "DyspozycjaIWLZKON": {
        "required": [
          "numerProducenta",
          "zgloszenie"
        ],
        "type": "object",
        "properties": {
          "komorkaOrganizacyjna": {
            "type": "string",
            "description": "Komórka organizacyjna ARiMR, do której składana jest dyspozycja"
          },
          "numerProducenta": {
            "type": "string",
            "description": "Numer producenta, który składa dyspozycję"
          },
          "zgloszenie": {
            "$ref": "#/components/schemas/ZgloszenieIWLZKONDTO"
          }
        }
      },
      "PobieranieDokumentuApiRequest": {
        "required": [
          "numerDokumentu"
        ],
        "type": "object",
        "properties": {
          "numerProducenta": {
            "type": "string",
            "description": "Numer producenta"
          },
          "numerDokumentu": {
            "type": "string",
            "description": "Numer dyspozycji (dokumentu)"
          }
        },
        "description": "Request pobierania dokumentu"
      },
      "PobieranieDokumentuResponse": {
        "type": "object",
        "properties": {
          "komunikat": {
            "type": "string",
            "description": "Komunikat"
          },
          "numerDokumentu": {
            "type": "string",
            "description": "Numer dokumentu"
          },
          "szczegoly": {
            "$ref": "#/components/schemas/BazoweZgloszenie"
          },
          "blad": {
            "type": "array",
            "description": "Bład",
            "items": {
              "$ref": "#/components/schemas/PobieranieDokumentuResponse"
            }
          }
        },
        "description": "Wynik pobierania dokumentu"
      }
    }
  }
}